/*! phoscon-app 2025-05-20 */

export var wpSwitchesHandlerFactory=(view,constants,actions)=>(ctx,event)=>{let ev=event.type,el=event.item;var aFuncs={[constants.Events.BTN_ADD_SWITCH_PRESSED]:actions.wpActionAddSwitchPressed(view,constants,ctx),[constants.States.PAGE_SWITCHES]:actions.wpPageSwitchesInit(view,constants,ctx),[constants.Events.SW_MODAL_PRESSED]:actions.wpPageSwitchesSwPressed(view,constants,ctx),[constants.Events.BTN_NEXT_PRESSED]:actions.wpPageSwitchesNextPressed(view,constants,ctx),[constants.Events.BTN_PREV_PRESSED]:actions.wpPageClosePressed(view,constants,ctx),[constants.Events.BTN_CLOSE_PRESSED]:actions.wpPageClosePressed(view,constants,ctx)},params={el:el};aFuncs[ev]?aFuncs[ev](params):view.swView.hide()};export var wpButtonsHandlerFactory=(view,constants,actions)=>(ctx,event)=>{let ev=event.type,dataBtn=event.dataBtn,sw=app.switches.get(app.session.m_swid);var aFuncs={[constants.Events.BTN_ADD_RL_PRESSED]:actions.wpActionAddRlPressed(view,constants,ctx),[constants.States.PAGE_BUTTONS]:actions.wpPageButtonsInit(view,constants,ctx),[constants.Events.BTN_PREV_PRESSED]:actions.wpPageButtonsPrevPressed(view,constants,ctx),[constants.Events.BTN_NEXT_PRESSED]:actions.wpPageButtonsNextPressed(view,constants,ctx),[constants.Events.SW_TARGET_PRESSED]:actions.wpPageButtonsSwTargetPressed(view,constants,ctx),[constants.Events.BTN_CLOSE_PRESSED]:actions.wpPageClosePressed(view,constants,ctx)},params={dataBtn:dataBtn,sw:sw};aFuncs[ev]?aFuncs[ev](params):view.btnView.hide()};export var wpFunctionsHandlerFactory=(view,constants,actions)=>(ctx,event)=>{let ev=event.type,sw=app.switches.get(app.session.m_swid),item=event.item,statekey=!(!sw||-1===sw.get("modelid").indexOf("cube"))?"gesture":"buttonevent";var aFuncs={[constants.States.PAGE_FUNCTIONS]:actions.wpPageFunctionsInit(view,constants,ctx),[constants.Events.BTN_PREV_PRESSED]:actions.wpPageFunctionsPrevPressed(view,constants,ctx),[constants.Events.BTN_NEXT_PRESSED]:actions.wpPageFunctionsNextPressed(view,constants,ctx),[constants.Events.FUNC_MODAL_PRESSED]:actions.wpPageFunctionsFuncPressed(view,constants,ctx),[constants.Events.SUBFUNC_MODAL_PRESSED]:actions.wpPageFunctionsSubfuncPressed(view,constants,ctx),[constants.Events.BTN_CLOSE_PRESSED]:actions.wpPageClosePressed(view,constants,ctx)},params={sw:sw,item:item,statekey:statekey};aFuncs[ev]?aFuncs[ev](params):view.funcView.hide()};export var wpGroupModeHandlerFactory=(view,constants,actions)=>(ctx,event)=>{let ev=event.type;var mode="editor";let sw=app.switches.get(app.session.m_swid);sw&&constants.helperFuncs.hasConfigGroup(sw,app.session.gid)&&(mode="group");var aFuncs={[constants.States.PAGE_GROUPMODE]:actions.wpPageGroupmodeInit(view,constants,ctx),[constants.Events.BTN_PREV_PRESSED]:actions.wpPageGroupmodePrevPressed(view,constants,ctx),[constants.Events.BTN_NEXT_PRESSED]:actions.wpPageGroupmodeNextPressed(view,constants,ctx),[constants.Events.BTN_GROUPMODE_PRESSED]:actions.wpPageGroupmodeGroupmodePressed(view,constants,ctx),[constants.Events.BTN_EDITORMODE_PRESSED]:actions.wpPageGroupmodeEditmodePressed(view,constants,ctx),[constants.Events.BTN_CLOSE_PRESSED]:actions.wpPageClosePressed(view,constants,ctx)},params={mode:mode};aFuncs[ev]?aFuncs[ev](params):view.gmView.hide()};export var wpGroupModeInfoHandlerFactory=(view,constants,actions)=>(ctx,event)=>{let ev=event.type;var aFuncs={[constants.States.PAGE_GROUPMODEINFO]:actions.wpPageGroupmodeinfoInit(view,constants,ctx),[constants.Events.BTN_PREV_PRESSED]:actions.wpPageGroupmodeinfoPrevPressed(view,constants,ctx),[constants.Events.BTN_NEXT_PRESSED]:actions.wpPageGroupmodeinfoNextPressed(view,constants,ctx),[constants.Events.BTN_CLOSE_PRESSED]:actions.wpPageClosePressed(view,constants,ctx)};aFuncs[ev]?aFuncs[ev]({}):view.gmiView.hide()};