/*! phoscon-app 2025-10-13 */

import{states}from"./settings-gateway-constants.js";export var generalViewHandlerFactory=view=>(ctx,activity)=>{let event=activity.type;document.querySelector(".context-menu-icon").parentNode.classList.remove("show-context"),event===states.GENERAL||event===states.INIT?view.show():event!==states.ADVANCED&&event!==states.POWER&&event!==states.DIAGNOSE||view.hide()};export var advancedViewHandlerFactory=view=>(ctx,activity)=>{let event=activity.type;document.querySelector(".context-menu-icon").parentNode.classList.remove("show-context"),event===states.ADVANCED||event===states.INIT?view.show():event!==states.GENERAL&&event!==states.POWER&&event!==states.DIAGNOSE||view.hide()};export var powerViewHandlerFactory=view=>(ctx,activity)=>{let event=activity.type;document.querySelector(".context-menu-icon").parentNode.classList.remove("show-context"),event===states.POWER||event===states.INIT?view.show():event!==states.ADVANCED&&event!==states.GENERAL&&event!==states.DIAGNOSE||view.hide()};export var diagnoseViewHandlerFactory=view=>(ctx,activity)=>{let event=activity.type;document.querySelector(".context-menu-icon").parentNode.classList.remove("show-context"),event===states.DIAGNOSE||event===states.INIT?restGetResource(app.zigbeeConfig).then(()=>{view.render(),view.show()}):event!==states.ADVANCED&&event!==states.GENERAL&&event!==states.POWER||view.hide()};