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