import{t as e}from"./h8ZNGKwS.js";import{t}from"./Dh0_SeCa.js";import{t as n}from"./NNmPkwqK.js";import{$n as r,An as i,Cn as a,Dn as o,Kn as s,Ln as c,Nn as l,Rt as u,Vt as d,ar as f,cn as p,cr as m,d as h,dn as g,jn as _,ln as v,un as y,wn as b,zn as x,zt as S}from"./DLvf9lie.js";import"./ibd78dIK.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=l({__name:`index`,setup(l){let{t:k}=u();p({title:a(()=>k(`home`))});let A=d(),j=h(),M=g(),N=y(),P=v(),F=r(null),I=a(()=>A.endpointList.length>0);return c(async()=>{if(M.public.mockMode||A.currentEndpoint){N.replace(`/${j.defaultPage||`overview`}`);return}await F.value?.autoLogin(P.query)}),(r,a)=>{let c=e,l=S;return x(),o(`div`,C,[b(`div`,w,[b(`div`,T,[b(`div`,E,[_(f(t),{size:28})]),a[0]||=b(`h1`,{class:`text-3xl font-bold tracking-tight text-base-content sm:text-4xl`},[i(` MetaCube`),b(`span`,{class:`text-primary`},`XD`)],-1),b(`p`,D,m(f(k)(`connectPrompt`)),1)]),_(c,{ref_key:`connectForm`,ref:F,"submit-label":f(k)(`connect`)},null,8,[`submit-label`]),b(`div`,O,[_(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:s(()=>[_(f(n),{size:15}),b(`span`,null,m(f(I)?f(k)(`savedEndpoints`):f(k)(`setup`)),1)]),_:1})])])])}}});export{k as default};