Parking Lot availability Map

Hi, I’m new here to all this, so I figured a little help from here would come in handy. So I want to develop a mobile app that represents a parking lot with 22 parking spaces divided into 2 rows. The thing is that I used 2 group containers that represent de rows and inside the cointer i put shape elements, representing the parking spaces. I want the parking spaces to be originally green (representing the space is empty) and when someone clicks it, it should turn red (representing the space is occuppied) and stay that way until someone clicks it again. I don’t know how to accomplish this last part. Any help would be welcome.

You should store the status of each space in the database and conditionally format the shapes based on the space’s status.