import{Br as e,Cr as t,Fn as n,H as r,Mn as i,Nn as a,Nr as o,Sr as s,Tr as c,V as l,Yr as u,er as d,gr as f,hr as p,ir as m,jr as h,nr as g,oi as _,ri as v,rr as y,t as b,yr as x}from"./KXnyWfWg.js";import"./BPCoDq-Y.js";import"./s5alW4sq.js";import{t as S}from"./bX0gzRkq.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=c({__name:`index`,setup(c){let{t:k}=i();d({title:p(()=>k(`home`))});let A=n(),j=b(),M=m(),N=y(),P=g(),F=u(null),I=p(()=>A.endpointList.length>0);return h(async()=>{if(M.public.mockMode||A.currentEndpoint){N.replace(`/${j.defaultPage||`overview`}`);return}await F.value?.autoLogin(P.query)}),(n,i)=>{let c=S,u=a;return o(),x(`div`,C,[f(`div`,w,[f(`div`,T,[f(`div`,E,[t(v(r),{size:28})]),i[0]||=f(`h1`,{class:`text-3xl font-bold tracking-tight text-base-content sm:text-4xl`},[s(` MetaCube`),f(`span`,{class:`text-primary`},`XD`)],-1),f(`p`,D,_(v(k)(`connectPrompt`)),1)]),t(c,{ref_key:`connectForm`,ref:F,"submit-label":v(k)(`connect`)},null,8,[`submit-label`]),f(`div`,O,[t(u,{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:e(()=>[t(v(l),{size:15}),f(`span`,null,_(v(I)?v(k)(`savedEndpoints`):v(k)(`setup`)),1)]),_:1})])])])}}});export{k as default};