1) If he the original owner, ATB may offer some sort of warrenty replacement DEAL* (as it was crash damage).
* These deal aren’t alway worth taking, especially if they offer you an old style frame, see point 2
2) These ‘older’ style frames don’t fetch a lot of money 2nd hand, so go pick up another cheap off ebay?
3) You could swap all the component onto another frame BUT your limited mainly by the sizes of kit already fitted, the main one being the fork steerer length & obviously it’s 130mm travel. Until you know this, you can’t check out of it’ll fit on a new frame. Other stuff like the seatpost (& SP QR) & maybe the need to get adapter for the front mech is inconvenient but not the end of the world.
Are we talking new of 2nd hand too?