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