Both are repairable.
The locking mechanism can be found at a auto salvage yard. You will have to look around for one that carries TJ's.
As for the top, someone else will have to answer that, but I've seen worst repaired.
1997 TJ Sport, 4.0 I6, 32RH A/T, 31x10.50 General Grabber AT2, SpiderTrax wheel spacers, modified front bumper
1946 Bantum trailer
1968 C-101 (Jeepster)