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

import{initMachine}from"./prototyp/machine.js";import{disableSensorSearch}from"./prototyp/functions.js";import{initTouchlinkCollection,initTouchlinkMachine}from"./prototyp/touchlink.js";initApp(),initMachine(),initTouchlinkCollection().then(()=>initTouchlinkMachine()).catch(err=>console.log("Error: "+err)),restGetResource(app.config).then(()=>restGetResource(app.lights)).then(()=>restGetResource(app.sensors)).then(res=>{setTimeout(()=>app.poll.pollRepeated(app.config),5e3),setTimeout(()=>app.poll.pollRepeated(app.lights),5e3),setTimeout(()=>app.poll.pollRepeated(app.sensors),5e3);let navItem=document.querySelector("#dPrototyp").parentElement;openNav(),loadLanguage(),window.addEventListener("load",function load(event){window.removeEventListener("load",load,!1),navItem.addEventListener("click",function(e){e.preventDefault()})},!1),window.onbeforeunload=function(e){disableSensorSearch()}});