rental property and hurricane damage

I am confused by how to handle my hurricane damage and insurance payout on a rental property that I have in Florida.  In 2022 hurricane Ian did about $28,000 in damage and the insurance provided a check for $20,000. All repairs were done before the end of 2022 except the roof payment which was 17,000 paid on 1/3/2023.  I know I can only deduct the actual losses of the $8000 but how do I split it between the roof paid in 2023 and all the other expenses paid in 2022?