Anything can be fixed with enough time and money.
If you are still interested in the house, I suggest that you get a qualified engineer to tell you how it needs to be repaired and a qualified contractor to tell you how much time and money will be required to implement the repairs. Then you can make an informed decision as to whether it falls within your tolerance. You will need to do this within your option period or negotiate an extension. Your agent should be able to advise you and facilitate your negotiation for further scoping, estimates and repair cost with the other party.
No one but you can make the determination as to whether it makes sense for you to pursue this deal further.
Good luck with your transaction - as stressful as it may be, it’s far better to learn about these things before it’s your house.