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

import{ButtonEvents}from"./state-constants.js";import{removeClassFromAll}from"./network-main-functions.js";export const ApCase8HandlerModalView=Backbone.View.extend({el:"#case8Modal",template:_.template(document.getElementById("ap-case8-modal-template").innerHTML),initialize:function(){this.el.innerHTML=this.template(app.wifi),this.render()},events:{"click .close":function(){app.stateEventHandler(ButtonEvents.CLOSE_PRESSED)},"click .btn-next":function(){app.stateEventHandler(ButtonEvents.NEXT_PRESSED)}},render:function(){return this},show:function(){this.el.classList.add("show")},hide:function(){this.el.classList.remove("show")},page1:function(){let elemList=this.el.querySelectorAll(".page");removeClassFromAll(elemList,"active-page"),this.el.querySelector(".modal-footer").classList.add("danger"),this.el.querySelector('[data-page="page1"]').classList.add("active-page"),this.el.querySelector(".btn-next").style.visibility="visible",this.el.querySelector(".close").classList.remove("hidden")},pageDeactivate:function(){let elemList=this.el.querySelectorAll(".page");removeClassFromAll(elemList,"active-page"),this.el.querySelector(".modal-footer").classList.remove("danger"),this.el.querySelector('[data-page="pageDeactivate"]').classList.add("active-page"),this.el.querySelector(".btn-next").style.visibility="hidden",this.el.querySelector(".close").classList.add("hidden")}});