import{$i as e,Ai as t,Ar as n,Li as r,Mr as i,Oi as a,Qr as o,S as s,Si as c,Wi as l,Xi as u,an as d,ei as f,hi as p,kr as m,mi as h,ni as g,ti as _,vi as v,wi as y,x as b,xi as x}from"./CzLxtfx3.js";import"./ZsVqGyZo.js";import{t as S}from"./NOGl-rn5.js";var C={class:`flex h-full items-center justify-center overflow-y-auto bg-base-100 p-4`},w={class:`animate-spring-up mx-auto w-full max-w-md`},T={class:`mb-8 text-center`},E={class:`mx-auto mb-4 flex h-14 w-14 items-center justify-center rounded-box bg-primary/12 text-primary`},D={class:`mt-2 text-sm text-base-content`},O={class:`mt-6 text-center`},k=y({__name:`index`,setup(y){let{t:k}=m();o({title:h(()=>k(`home`))});let A=i(),j=d(),M=g(),N=_(),P=f(),F=l(null),I=h(()=>A.endpointList.length>0);return a(async()=>{if(M.public.mockMode||A.currentEndpoint){N.replace(`/${j.defaultPage||`overview`}`);return}await F.value?.autoLogin(P.query)}),(i,a)=>{let o=S,l=n;return t(),v(`div`,C,[p(`div`,w,[p(`div`,T,[p(`div`,E,[c(u(s),{size:28})]),a[0]||=p(`h1`,{class:`text-3xl font-bold tracking-tight text-base-content sm:text-4xl`},[x(` MetaCube`),p(`span`,{class:`text-primary`},`XD`)],-1),p(`p`,D,e(u(k)(`connectPrompt`)),1)]),c(o,{ref_key:`connectForm`,ref:F,"submit-label":u(k)(`connect`)},null,8,[`submit-label`]),p(`div`,O,[c(l,{to:`/setup`,class:`inline-flex items-center gap-1.5 text-sm text-base-content/80 no-underline transition-colors hover:text-base-content`},{default:r(()=>[c(u(b),{size:15}),p(`span`,null,e(u(I)?u(k)(`savedEndpoints`):u(k)(`setup`)),1)]),_:1})])])])}}});export{k as default};