Picture Entity Card confirmation doesn't like variables?

I have a picture entity with a toggle, and I want to set a variable text inside, but when outputting it shows the variable code as opposed to what the value is. Code below for tap action:

                tap_action:
                  confirmation:
                    text: |-
                      [[[ 
                        if (states['switch.ps5_mxp_power'].state == 'on') return 'Are you sure you want to power the Playstation off?'; else return 'Are you sure you want to power the Playstation on?';
                      ]]]
                  action: switch.toggle
                  target:
                    entity_id: switch.ps5_mxp_power

Most core cards do not support templates, JavaScript or Jinja.

ok, I guess I’ll just make a generic confirmation

There is this: