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

import{checkRoomAmount}from"../dashboard/dashboard-functions.js";export var initDashboard=()=>ctx=>{-1===location.href.indexOf("#groups")&&(document.getElementById("room-wrapper").classList.remove("hidden"),document.getElementById("group-wrapper").classList.add("hidden"),app.roomViews&&restGetResource(app.rooms).then(()=>{app.roomViews.createColumnsDashboard(),app.roomViews.loadRoomOrder(),app.roomViews.refreshRooms(),checkRoomAmount()}))};export var initGroups=()=>ctx=>{document.getElementById("room-wrapper").classList.add("hidden"),document.getElementById("group-wrapper").classList.remove("hidden"),app.router.navigate("groups",{trigger:!0}),app.session.gid=window.location.hash.split("/")[1],restGetResource(app.rooms).then(()=>{app.session.roomElements=countRoomElements(),app.groupPageViews&&(app.groupPageViews.groupListView&&app.groupPageViews.groupListView.render(),app.groupPageViews.deviceListView&&app.groupPageViews.deviceListView.render(),app.groupPageViews.sceneListView&&app.groupPageViews.sceneListView.render(),app.groupPageViews.scheduleListView&&app.groupPageViews.scheduleListView.render(),app.groupPageViews.automationListView&&app.groupPageViews.automationListView.render(),app.groupPageViews.sensorControlListView&&app.groupPageViews.sensorControlListView.render(),app.groupPageViews.switchEditListView&&app.groupPageViews.switchEditListView.render())})};