My breaker panel started gushing water during a storm. Is it safe for us to turn it on now that it's over? Does it need to be replaced? Will we get electrocuted if we turn it on while it's still wet though no longer gushing?
Flooded light-duty electrical equipment is universally beyond simple remediation due to the potential for water, salt deposits, and debris to have gotten into inaccessible areas and absorbed into insulating materials, causing arc tracking vulnerabilities, reduced insulating capability of insulators, corrosion damage to metal parts, and the potential for mechanical jamming or contact impairment due to debris. De-energize this equipment immediately (turn the main breaker off if it isn't already off and also call your electrical utility to have them shut power off to your address as you can no longer trust the main breaker(s) to shut power off properly at this point), and do not turn it back on until the situation is fully remediated.
See this Square-D document and this Littlefuse document for more information. If you provide more details about the affected electrical equipment, I can give more details about the remediation your situation requires.
NM cable is not rated for wet locations. That is a wet location. All your NM cables have paper packing, and all have had wicking action drag water several feet up the cable. It may take a year to dry, in the meantime the hot and neutral wire insulation is not made for water contact.
There's obviously some sort of environmental problem that makes this happen, and from the rust on the panel, I'm guessing this isn't the first time.
So, given that your house is now stone dead, and I'm guessing there will be other flood related issues rendering the home not fit for occupancy in the short term... this is an absolutely fantastic time to do a DIY main panel replacment. DIY saves a fortune in cash, especially if everyone else has the same problem and there's a big queue at the electrician's.
So solve your problem Houston style -- talk to the power company and figure a new place for a meter pan that won't flood, get a meter pan with main breaker built-in, making your new panel a subpanel that can be fully deenergized by cutting the main breaker. That makes it easier to work on safely. Now, where cables have to go into the flood zone, first use UF cable which is made for immersion, and second put GFCI breakers on the wet-risk circuits. If you've seen pictures of the Houston floods, you noticed many 2-storey apartments with lights and A/C running in the upper floors. That's how they do that trick!
I have only repaired about 1/2 dozen flooded homes. The breaker panel will need to be opened , cleaned and the breakers replaced. Any outlets or switches that were under water should also be replaced. After that each branch circuit should be checked with a megger this is a high voltage ohm meter that will verify the integrity of the insulation. On one of the homes the owner tried to save some $ by using contact cleaner on the outlets and switches, that did work for many of the outlets but all the switches failed and the amount it cost for me to test then replace the switches and outlets that failed cost more than replacing everything the first time around. Once the breakers go under water they must be replaced. Added on one of the homes I forgot to mention that the service was running for several days prior to the power being shut down and everything in the service panel including part of the metal case was eaten away so although this is a DIY site getting an electrical service back online after a flood requires special cleaning & testing unless everything is replaced.