I have some recent experience with this very problem. My 47 foot cutter
flooded to the top of the settee bases, submerging the batteries, a big part of the electrical system
including the alternator, starter and pumps.
Submerging a live electrical system
in salt water
destroys it. On rewiring the boat, I found water in most of the submerged cables
. Of course, all of the submerged motors had to be replaced.
In terms of the cabinetry and partially submerged machinery, the yard treated every thing with salt rid (or something like that) and flushed everything with fresh water. Of course, there were areas that they could not get to with the salt rid, but overall the interior cabinetry came out pretty well.
A lot will depend on how long the cabinetry was submerged. The flooding on my boat happened at the yard and was quickly discovered, so damage was minimal.
You have to get ALL of the water out of the boat. The yard left some water standing in the bilge
(water that the bilge
pumps couldn't reach), so the heaters and dehumidifier that they put in the boat to dry it out weren't doing much good until I vacuumed all of the water out with a wet dry vac. It still took weeks to dry.
The other thing you will have to pay attention to is the refrigerator
cabinet. If it was partly or completely submerged, the insulation
will be saturated and you will have to remove and replace it.
Bottom line, if the boat isn't insured or you aren't getting it for free, you probably need to walk away, especially if the engine needs to be replaced. Mine was only partly submerged and other than the starter, wiring harness and alternator, not damaged.
Another thing to consider is corrosion to any submerged metal such as tanks
and Seacocks, which if bonded may have been subjected to high electrical
currents. Mine were and all of the Seacocks and thruhulls had to be replaced. The jury's still out on the tanks
Fortunately, my loss was covered by insurance
because its cost about $40k (and counting) so far.
Best of luck.