import{d as f,cj as S,ck as p,cl as g,cm as k,cn as v,b3 as h,G as w,e as M,o as m,n as E,w as i,a as s,I as P,J as R,E as T,c as j,co as C,F as N}from"../../../js/index-BVJsRopY.js";import{_ as V}from"../../../js/AppFooter-B-qMSqC3.js";import{_ as x}from"../../../js/AppNavigation-BkIMMRqT.js";const u=(o,e)=>{let t;return o.query[e]?t=o.query[e]:o.params[e]?t=o.params[e]:t=new URLSearchParams(window.location.search).get(e),t},U=f({__name:"MainLayout",setup(o){const e=S(),t=p(),r=g(),_=k(),l=v(),d=[{icon:"mdi:mdi-tools",id:"nestProject",simulator:"nest",title:"Sandbox",to:{name:"nestProjectRoot"}},{icon:"nest:logo",id:"nestModel",simulator:"nest",title:"Model",to:{name:"nestModelRoot"}}];return h(()=>{let a=!1;const c=u(l,"nest_server_url");c&&(r.state.url=c,a=!0);const n=u(l,"nest_server_access_token");n&&(r.state.accessToken=n,a=!0),a&&r.update(),e.init(),_.init(),t.state.loading=!1}),(a,c)=>{const n=w("router-view");return M(t).state.loading?(m(),E(T,{key:0},{default:i(()=>[s(R,{class:"fill-height"},{default:i(()=>[s(P,{class:"ma-auto",color:"primary",indeterminate:""})]),_:1}),s(V)]),_:1})):(m(),j(N,{key:1},[s(x,{"nav-items":d}),s(C,null,{default:i(()=>[s(n)]),_:1})],64))}}});export{U as default};
