Sync Filters for building flat sell project

Hi there, I would like to ask if there is a way, how to sync two Term filters.

I have a flats in floors in buildings. When I select a building, I need to preselect first available floor. Ideally in same AJAX call.

Also, not all buildings have a same amount of floors. If building E doesnt have 1st floor and I have currently selected building A, floor 1, I cannot switch to building E.


(filters, custom code adding map by URL filter, filtered query)

Here is my site: Ceník – Rezidence u Sv. Eliáše password is bytyhury2025

Can anyone help me figure it out? I can write JS/PHP, and I tried a lot, but I cannot make the filter sync work. Maybe, it can be done with interactions, but I need your help.

Please, let me know, how I could approach this. Thank you!

So I ended up with two interactions after ajax and ton of javascript. And it works.