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

export const initStateHandlers=params=>{let views=params.views,funcs=params.funcs,states=params.states;if(!views||!states||!funcs)throw new Error("Param is missing - initStateHandlers()");const overviewView=views.Overview,listView=(views.EmptyView,views.ListView),gatewayView=views.GatewayView,inputView=views.InputView,resetView=views.ResetView,newPWView=views.NewPwView,installView=views.InstallView;let map={};return map[states.OVERVIEW]=funcs.overviewHandlerFactory(overviewView,states),map[states.OVERVIEW_LIST]=funcs.listHandlerFactory(listView,states),map[states.GATEWAY]=funcs.gatewayHandlerFactory(gatewayView,states),map[states.GATEWAY_INPUT]=funcs.gwInputHandlerFactory(inputView,states),map[states.GATEWAY_RESET]=funcs.gwResetHandlerFactory(resetView,states),map[states.GATEWAY_NEWPW]=funcs.gwNewPwHandlerFactory(newPWView,states),map[states.GATEWAY_INSTALL]=funcs.gwInstallHandlerFactory(installView,states),map[states.START_SCAN]=funcs.scanHandlerFactory(overviewView,states),map[states.STOP_SCAN]=funcs.scanHandlerFactory(overviewView,states),map};