Israel has carried out dozens of airstrikes on Iran and has declared an emergency as it braces for retaliation.