Here's how to determine what your car is worth:
Finde the value in clean condition. The subract off the repair costs, including the $2800 for body work. that's what the dealer does when they evaluate your car. Then they take off the overhead involved in processing hte car and selling it. If the dealer is offering $4000, htey must have found other things it needs besides the body work. You can try to sell it for $10,000, but don't be surprised if you don't get it.