import{$r as e,Ar as t,Dr as n,Ei as r,Fi as i,Hi as a,Ji as o,Oi as s,Or as c,Qr as l,S as u,Si as d,Xr as f,Zi as p,bi as m,ei as h,fi as g,gi as _,pi as v,rn as y,x as b,yi as x}from"./CWa6_HoJ.js";import"./CuBO3oar.js";import{t as S}from"./CTjSelY7.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=d({__name:`index`,setup(d){let{t:k}=n();f({title:g(()=>k(`home`))});let A=t(),j=y(),M=h(),N=e(),P=l(),F=a(null),I=g(()=>A.endpointList.length>0);return r(async()=>{if(M.public.mockMode||A.currentEndpoint){N.replace(`/${j.defaultPage||`overview`}`);return}await F.value?.autoLogin(P.query)}),(e,t)=>{let n=S,r=c;return s(),_(`div`,C,[v(`div`,w,[v(`div`,T,[v(`div`,E,[m(o(u),{size:28})]),t[0]||=v(`h1`,{class:`text-3xl font-bold tracking-tight text-base-content sm:text-4xl`},[x(` MetaCube`),v(`span`,{class:`text-primary`},`XD`)],-1),v(`p`,D,p(o(k)(`connectPrompt`)),1)]),m(n,{ref_key:`connectForm`,ref:F,"submit-label":o(k)(`connect`)},null,8,[`submit-label`]),v(`div`,O,[m(r,{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:i(()=>[m(o(b),{size:15}),v(`span`,null,p(o(I)?o(k)(`savedEndpoints`):o(k)(`setup`)),1)]),_:1})])])])}}});export{k as default};