[help] picture-elements conditional

Hi

i using picture-elements to show person pic and his location using “entity: person.bar”

i know that the entity entity: person.bar have 4 state, i want to change the pic according to state how to do it?

       - type: vertical-stack
          cards:
            - type: horizontal-stack
              cards:
                - type: picture-elements
                  image: /local/lovelace/pic/bar.jpg
                  elements:
                    - type: state-label
                      entity: person.bar
                      prefix: 'Bar -- '
                      style: {color: white, left: 30%, top: 90%}
                    - type: state-icon
                      entity: sensor.bar_phone_battery
                      tap_action: more_info
                      style: {color: white, left: 73%, top: 90%}
                    - type: state-label
                      entity: sensor.bar_phone_battery
                      style: {color: white, left: 87%, top: 91%}