Repair at a shop is going to be expensive, period.
I am assuming the car was at least partially submerged, or driven through water deep enough to cause the engine to stop.
In that later case it is probably that the engine has hydraulic locked, which means bent valves and possibly bent rods. Bad news.
Any of the oiled, and lubed parts, once submerged should be disassembled, cleaned, relubricated, then reassembled. This is time consuming and expensive.
Total loss would mean the car would need to be rebuilt, most likely. On the plus side, if you do get totaled, the insurance companies will generally pay our more than a fair sale valve for the car in these situations, which should allow you to get another car with less miles, possibly a newer car. It will be used, but that honestly isn't all that much to be scared of.