Add if condition Samsung TV Script

Hi
Here is my Script i need to add this as an IF TV_Samsung_7_Series_55_Source_Name how do i do this as really new to all of this

configuration: {}
triggers:

  • id: “4”
    configuration:
    itemName: PS5_Online
    state: ON
    previousState: OFF
    type: core.ItemStateChangeTrigger
    conditions: []
    actions:

  • inputs: {}
    id: “1”
    configuration:
    type: application/vnd.openhab.dsl.rule
    script: "TV_Samsung_7_Series_55_Power.sendCommand("ON")

    Thread::sleep(6000)
    
    TV_Samsung_7_Series_55_Key_Code.sendCommand(\"KEY_HDMI\")
    
    \   \ 
    
    \   \ 
    
    \    "
    

    type: script.ScriptAction

  • inputs: {}
    id: “3”
    configuration:
    command: 312,100,100
    itemName: Tapo_L930__Color
    type: core.ItemCommandAction

  • inputs: {}
    id: “2”
    configuration:
    command: 316,100,100
    itemName: WiZ_Full_Color_Bulb_at_19216868192_Color
    type: core.ItemCommandAction

  • inputs: {}
    id: “5”
    configuration:
    command: color
    itemName: Twinkly_Mode_selection
    type: core.ItemCommandAction