I seen a fair bit of this over the years, owners get really upset when this happens as they just see bent this and that. The insurance company sees total cost and as pointed out new parts prices can easily wipe out the total value of a bike, not to mention labour costs. I've seen many a 6k plus bike written off with nothing more than heavily scuffed, fairing panels, bent bars, scratched end can etc.
Without looking at the bike, it's hard to say what is actually damaged, but its rare they are a total write off Cat A or B. Most bikes written off fall into either Cat C, Can be repaired, but it would cost more than the vehicle’s worth or Cat D, Can be repaired and would cost less than the vehicle’s worth, but other costs (such as transporting your vehicle) take it over the vehicle’s value. Two other Cat are S and N these are just repairables i.e. broken headlight etc.
Find out what Cat yours is. If it's C or D you can buy it as salvage e.g. the value of the bike is 4k, total cost repair is 6k, salvage is 3k for spares or repair to road. You want the bike they, deduct 3k from the 4k they give you the bike plus 1k, if the parts are less and you do the work yourself chance are you'll not spend all the 1k.
Now this is where the haggling starts, you now want as higher value as possible e.g. 4k, they'll value your bike at 2.5k. If the price of parts new or old are more than the difference you are out of pocket. Generally reject the first offer, possible the second, they just want shot of it but for minimal cost, do your sums set the limit and play the game. Generally you can get a really good result.
Word of caution, you've got to know exactly what the damage is and you can get access, it's your property until you agree to accept it's written off.
The other side of the coin is if you can get say 4 or 4.5k as a write off. You should be able to find another without too much difficulty, without all the hassle.
Good luck lets us know how you get on.