import{i as l,q as m,x as u,aj as p,c as a,b as c,w as _,aB as f,o as s,p as w,r as v,a6 as y}from"./entry-dab49bd.js";import{_ as h}from"./Container-dab49bd.js";import{a as x,c as k}from"./wifiStore-dab49bd.js";const B={"data-id":"layout-locked",class:"w-screen min-h-screen px-4 sm:px-6 py-4"},S={key:0,class:"w-full max-w-[328px] mx-auto"},b={key:1,class:"w-screen h-screen absolute top-0 left-0 flex items-center justify-center"},U=l({__name:"locked",setup(A){const e=x(),n=k(),o=m(!0);async function t(){n.apiKey&&e.busyBar.setApiKey(n.apiKey);try{await e.fetchDeviceName(!0),await f("/")}catch{await e.fetchHttpAPIAccess()}setTimeout(()=>{o.value=!1},500)}return u(async()=>{await t(),window.addEventListener("device-reconnected",t)}),p(()=>window.removeEventListener("device-reconnected",t)),(i,C)=>{const r=y,d=h;return s(),a("div",B,[c(d,null,{default:_(()=>[w(o)?(s(),a("div",b,[c(r,{name:"i-busy-loader",class:"size-12 animate-spin text-muted"})])):(s(),a("div",S,[v(i.$slots,"default")]))]),_:3})])}}});export{U as default};
