WOW.....I surprised it wasn't a totalled...write off, once the extent of the damage was known. New engine/labor was probably $14,000 of that 20 grand. Body work/labor probably took another big chunk.
They must have been feeling generous. That cost had to have been above the depreciation point. Rental??? Or Personal car???? Or was it insured to the hilt with GAP INSURANCE?
Which ever, or what, your lucky,...very lucky it worked out for you. I think most of us would have been left holding the bag. I imagine this thread could easily be filled with horror stories.