Buy new. The bike isn't worth what it will take to repair the obvious damage. BTW, has anyone checked the frame alignment? It the accident was that bad, it could have bent the frame and then all of your other money is wasted.
As to "trade in" value, it's probably nearly zero. You may be able to sell the usable components on ebay or Craig's List but the shop probably will give you next to nothing.