I’ve had two experiences with totaled cars (thanks to H.) In both cases, our insurance company had the cars towed, inspected and repairs attempted before declaring them totaled. We were paid what we believed was the full fair market value of each one, with no deduction for the repair costs.
I would push back on being charged the repair costs if there’s any hope of recovering them.