Ask the insurance company what the cost of buying it back is, you could end up quids in if they pay you the value of the bike, and you buy it back for less than that you have the difference to repair it with. Make sure you properly research prices on parts you'll need though as some parts are prety dear (such as the tank) and this will have contributed to writing the bike off