/*! phoscon-app 2024-10-07 */

export function initSmartThingsButtonPages(pageParams){let c=pageParams.constants,s=pageParams.scanStates;return[{id:"SMARTTHINGS_BUTTON_PAGE_1",url:"devices-switches/smartthings/button/page-1.html",eventHandler:[{event:c.ON_ENTRY,actions:[{type:c.SHOW_PAGE,data:"SMARTTHINGS_BUTTON_PAGE_1"},{type:c.REMOVE_CLASS_ELEM,data:{identifier:c.MODAL_FOOTER,c:c.DANGER}},{type:s.START_SCAN,data:120}]},{event:c.BTN_PREV_PRESSED,actions:[{type:s.STOP_SCAN},{type:c.CALL_PAGE,data:c.PAGE_SMARTTHINGS_PRODUCT}]},{event:s.DEVICE_ADDED,actions:[{type:s.STOP_SCAN},{type:c.CALL_PAGE,data:"SMARTTHINGS_BUTTON_PAGE_2"}],cond:{modelids:["button"]}},{event:s.NO_DEVICE_ADDED,actions:[{type:s.STOP_SCAN},{type:c.CALL_PAGE,data:"SMARTTHINGS_BUTTON_PAGE_ERROR"}]},{event:c.BTN_CLOSE_PRESSED,actions:[{type:s.STOP_SCAN},{type:c.CLOSE_MODAL,data:"switchWizardModal"}]}]},{id:"SMARTTHINGS_BUTTON_PAGE_2",url:"devices-switches/smartthings/button/page-2.html",eventHandler:[{event:c.ON_ENTRY,actions:[{type:c.SHOW_PAGE,data:"SMARTTHINGS_BUTTON_PAGE_2"},{type:c.ADD_CLASS_ELEM,data:{identifier:c.MODAL_FOOTER,c:c.SUCCESS}}]},{event:c.BTN_CLOSE_PRESSED,actions:[{type:c.CLOSE_MODAL,data:"switchWizardModal"}]},{event:c.BTN_NEXT_PRESSED,actions:[{type:c.CLOSE_MODAL,data:"switchWizardModal"},{type:c.CALL_FUNC,data:"routeToDetails"}]}]},{id:"SMARTTHINGS_BUTTON_PAGE_ERROR",url:"devices-switches/smartthings/button/page-error.html",eventHandler:[{event:c.ON_ENTRY,actions:[{type:c.SHOW_PAGE,data:"SMARTTHINGS_BUTTON_PAGE_ERROR"}]},{event:c.BTN_PREV_PRESSED,actions:[{type:c.CALL_PAGE,data:"SMARTTHINGS_BUTTON_PAGE_1"}]},{event:c.BTN_CLOSE_PRESSED,actions:[{type:c.CLOSE_MODAL,data:"switchWizardModal"}]}]}]};