/*! phoscon-app 2024-02-26 */

export const pageMachine=states=>{const overviewStates={initial:"idle",states:{idle:{on:{IDLE:"idle",OVERVIEW_LIST:"list"}},list:{on:{IDLE:"idle"},onEntry:[{type:"callFactoryFunc",state:states.OVERVIEW_LIST}],onExit:[{type:"callFactoryFunc",state:states.OVERVIEW_LIST}]}}},detailStates={initial:"idle",states:{idle:{on:{IDLE:"idle",GATEWAY_INPUT:"input",GATEWAY_RESET:"reset",GATEWAY_NEWPW:"pwnew",GATEWAY_INSTALL:"install"}},input:{on:{IDLE:"idle",GATEWAY_INPUT:"input",GATEWAY_RESET:"reset",GATEWAY_NEWPW:"pwnew",GATEWAY_INSTALL:"install",BTN_LOGIN_PRESSED:{actions:{type:"callFactoryFunc",state:states.GATEWAY_INPUT}},BTN_PWFORGOT_PRESSED:{actions:{type:"callFactoryFunc",state:states.GATEWAY_INPUT}}},onEntry:[{type:"callFactoryFunc",state:states.GATEWAY_INPUT}],onExit:[{type:"callFactoryFunc",state:states.GATEWAY_INPUT}]},reset:{on:{IDLE:"idle",GATEWAY_INPUT:"input",GATEWAY_RESET:"reset",GATEWAY_NEWPW:"pwnew",GATEWAY_INSTALL:"install",BTN_PWRESET_PRESSED:{actions:{type:"callFactoryFunc",state:states.GATEWAY_RESET}}},onEntry:[{type:"callFactoryFunc",state:states.GATEWAY_RESET}],onExit:[{type:"callFactoryFunc",state:states.GATEWAY_RESET}]},pwnew:{on:{IDLE:"idle",GATEWAY_INPUT:"input",GATEWAY_RESET:"reset",GATEWAY_NEWPW:"pwnew",GATEWAY_INSTALL:"install",INPUT_CHANGE:{actions:{type:"callFactoryFunc",state:states.GATEWAY_NEWPW}},BTN_LOGIN_PRESSED:{actions:{type:"callFactoryFunc",state:states.GATEWAY_NEWPW}}},onEntry:[{type:"callFactoryFunc",state:states.GATEWAY_NEWPW}],onExit:[{type:"callFactoryFunc",state:states.GATEWAY_NEWPW}]},install:{on:{IDLE:"idle",GATEWAY_INPUT:"input",GATEWAY_RESET:"reset",GATEWAY_NEWPW:"pwnew",GATEWAY_INSTALL:"install",BTN_LOGIN_PRESSED:{actions:{type:"callFactoryFunc",state:states.GATEWAY_INSTALL}}},onEntry:[{type:"callFactoryFunc",state:states.GATEWAY_INSTALL}],onExit:[{type:"callFactoryFunc",state:states.GATEWAY_INSTALL}]}}};return{initial:"init",states:{init:{on:{INIT:"init",OVERVIEW:"overview",GATEWAY:"gateway"}},overview:{on:{INIT:"init",GATEWAY:"gateway",GW_PRESSED:{actions:[{type:"callFactoryFunc",state:states.OVERVIEW}]},CALL_ROUTER:{actions:["callRouter"]}},onEntry:[{type:"callFactoryFunc",state:states.OVERVIEW}],onExit:[{type:"callFactoryFunc",state:states.OVERVIEW}],...overviewStates},gateway:{on:{INIT:"init",OVERVIEW:"overview",BTN_BACK_PRESSED:{actions:{type:"callFactoryFunc",state:states.GATEWAY}},CALL_ROUTER:{actions:["callRouter"]}},onEntry:[{type:"callFactoryFunc",state:states.GATEWAY}],onExit:[{type:"callFactoryFunc",state:states.GATEWAY}],...detailStates}}}};