I had a water leak in the bathroom....ice must have formed in the water supply hose to the toilet. Wife found it the hard way...SUCH LANGUAGE! (Deming, NM in February....14 degrees that nite.) Two days later, outside of Phoenix, AZ is when the hose burst.
Anyway, water got turned off and Home Depot was open at 7:30 on a Sunday morning. Bought a small garden hose, cut it to length...and it's still there, some 6 years later
Yes...carpet was soaked. Tried a (rented)shop vac...did some, not all, so I let nature take it's course...and 3 days later, all was dry and no visable mold or anything else. Of course this happened in Phoenix in
Electrical stuff/ You might get lucky...and when things dry out they might work just fine.
Whatever...be patient and good uck.