import{u as h,L as v,M as x,N as y,t as b,A as _,z as s,x as t,B as S,O as l,P as q,Q as V,R as w}from"./CmHOFg8z.js";import{r as a,s as B}from"./C5S3lQXN.js";import{_ as N}from"./B_Nv8JJS.js";import{_ as $}from"./s3gktBQr.js";const k={class:"pt-20 fit"},z={class:"row justify-center items-center"},C={class:"col-12 col-sm-6 col-md-4 col-lg-3"},Q={class:"bg-zinc-800 rounded-sm text-center p-6"},O={class:"text-lg"},R={class:"pt-10"},T=t("br",null,null,-1),j={class:"pt-4"},A=t("br",null,null,-1),E={__name:"index",setup(L){const r=h(),i=y(),o=v({loading:!1,entry:{url:"http://localhost:4000"}});async function d(){o.loading=!0,a.setServer(o.entry.url);var n=await a.fetchStudio().then(e=>e).catch(e=>e);n?(B.cf=n,a.setTenant(n.tenants[0]),a.saveConfig(),r.push("/space/data")):i.notify({message:"Something went wrong"}),console.log(n),o.loading=!1}return(n,e)=>{const u=q,p=V,m=w,f=N,g=$;return b(),x(g,null,{default:_(()=>[s(f,{class:""},{default:_(()=>[t("div",k,[t("div",z,[t("div",C,[t("div",Q,[t("div",O,[s(u,{size:"lg",name:"bi-alt"}),S(" Stdio")]),t("div",R,[s(p,{modelValue:l(o).entry.url,"onUpdate:modelValue":e[0]||(e[0]=c=>l(o).entry.url=c),label:"Server url"},null,8,["modelValue"])]),T,t("div",j,[s(m,{loading:l(o).loading,onClick:e[1]||(e[1]=c=>d()),"no-caps":"",color:"primary",label:"Open studio"},null,8,["loading"])]),A])])])])]),_:1})]),_:1})}}};export{E as default};
