/*! phoscon-app 2025-08-29 */

import*as scheduleFunctions from"./schedule-functions.js";export var emptyHandlerFactory=(view,overView,listView,navView,constants)=>(ctx,event)=>{let c=constants,type=event.type;type===c.states.EMPTY?(view.show(),navView.showEmptyState()):type===c.events.ADD_SCHEDULE?scheduleFunctions.addSchedule(overView,listView):view.hide()};export var overviewHandlerFactory=(view,listView,navView,constants)=>(ctx,event)=>{let c=constants,type=event.type;type===c.states.OVERVIEW?(view.show(),navView.hideEmptyState()):type===c.states.INIT||(type===c.events.DELETE_CLICKED?scheduleFunctions.deleteSchedule(listView,view,constants):type===c.events.RENAME_CLICKED?scheduleFunctions.renameSchedule(listView,view,constants):type===c.events.ADD_SCHEDULE?scheduleFunctions.addSchedule(view,listView):type===c.events.ACTIVATE_SCHEDULE?scheduleFunctions.activateSchedule(view,listView):type===c.events.DEACTIVATE_SCHEDULE?scheduleFunctions.deactivateSchedule(view,listView):type===c.events.WEEKDAY_CLICKED?scheduleFunctions.saveWeekdays(view,event.day):type===c.events.FADING_TIME_CHANGED?scheduleFunctions.adaptFadingTime(view,event.value):type===c.events.TIME_CHANGED?scheduleFunctions.adaptTime(view,event.value):type===c.events.TIMER_FINISHED?view.clickEvents(!0):type===c.events.TOGGLE_FADING?scheduleFunctions.toggleFadingStart(view,event.value):view.hide())};export var navHandlerFactory=(view,settingsView,constants)=>(ctx,event)=>{let c=constants;event.type===c.events.SCHEDULE_CHANGED&&scheduleFunctions.scheduleChanged(view,constants)};export var scheduleListHandlerFactory=(view,overView,constants)=>(ctx,event)=>{let c=constants;event.type===c.events.SCHEDULE_SELECTED&&scheduleFunctions.setActiveSchedule(overView,view,constants)};export var sceneListHandlerFactory=(view,overView,constants)=>(ctx,event)=>{let c=constants,type=event.type;type===c.events.SCENE_SELECTED?scheduleFunctions.selectScene(view,overView,constants):type===c.events.GROUP_OFF&&scheduleFunctions.groupOff(view,overView,constants)};