Quite apart from the parts cost there's the time it would take - all the while the liable party having to stump up for a hire car. It doesn't take long to hit the point at which writing it off makes economic sense for the one paying the bills.
This is the key thing.
Whether it's repairable is not the same as whether it's a write off. A write off is an economic decision.
The insurer needs to sum up the costs to repair the car, and guarantee the repairs, plus all of the incidental costs such as hire cars etc. Then work out what they can get for salvage value for the wreck.
Then work out whether it makes better economic sense to write it off and pay out the driver.