import{d as g,ex as S,ey as B,r as x,F as A,b as o,c as t,bw as m,ez as v,er as c,eA as k,ew as w,e as r,I,eu as b,u as j,eq as T,bu as f,t as h,eB as L,eC as C,a as W}from"./registerWidgets.6f5be576.js";import{d as E,w as F,a as N,c as O,m as P,b as R}from"./icons.b2622455.js";import{T as V}from"./Tooltip.48415745.js";import{_ as z}from"./logo.084e5d7c.js";import{a as K}from"./asyncComputed.ea0bb8a8.js";import{W as M}from"./workspaces.79e459cd.js";import{L as $,D as q}from"./DocsButton.2fd09a1b.js";import"./activeRecord.eb203c6f.js";import"./pubsub.1dc45978.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},n=new Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="f294ddaa-f006-4b1b-a61b-2176eafd0867",e._sentryDebugIdIdentifier="sentry-dbid-f294ddaa-f006-4b1b-a61b-2176eafd0867")}catch{}})();const G={class:"sidebar"},H={class:"section-name"},U=["onClick"],J={class:"item-name"},Q={key:0,class:"tag soon"},X={key:1,class:"tag beta"},Y={key:2,class:"tag cloud"},Z=g({__name:"Sidebar",setup(e){var u;const n=S(),i=B(),a=x((u=i.name)!=null?u:"forms"),_=A(()=>[{name:"Runtime",items:[{name:"Forms",icon:E,path:"forms"},{name:"Hooks",icon:F,path:"hooks"},{name:"Dashes",icon:N,path:"dashes",beta:!0}]},{name:"Settings",items:[{name:"Style",icon:O,path:"style"},{name:"Sidebar",icon:P,path:"sidebar"}]}]),y=l=>{l.unavailable||(n.push(l.path),a.value=l.path)};return(l,p)=>(o(),t("div",G,[(o(!0),t(m,null,v(_.value,d=>(o(),t("div",{key:d.name,class:"section"},[c("span",H,k(d.name),1),(o(!0),t(m,null,v(d.items,s=>(o(),t("div",{key:s.name,role:"button",class:w(["item",{active:a.value===s.path,disabled:s.unavailable||d.cloud}]),tabindex:"0",onClick:ge=>y(s)},[r(I,{class:w(["icon",{disabled:s.unavailable,active:a.value===s.path}]),path:s.icon,width:"20",height:"20"},null,8,["class","path"]),c("span",J,k(s.name),1),s.unavailable?(o(),t("span",Q,"SOON")):b("",!0),s.beta?(o(),t("span",X,"BETA")):b("",!0),s.cloud?(o(),t("span",Y,"CLOUD")):b("",!0),s.warning?(o(),j(V,{key:3,class:"warning",text:s.warning,fixed:!0,top:18,left:18},{default:T(()=>[r(I,{path:f(R),fill:"#D35249",width:"20",height:"20"},null,8,["path"])]),_:2},1032,["text"])):b("",!0)],10,U))),128))]))),128))]))}});const ee=h(Z,[["__scopeId","data-v-7f7d195e"]]);const oe={},D=e=>(L("data-v-ccfb70ef"),e=e(),C(),e),te={class:"logo"},se=D(()=>c("img",{src:z,alt:"Abstra cloud logo"},null,-1)),ae=D(()=>c("span",null," Abstra ",-1)),ne=[se,ae];function ce(e,n){return o(),t("div",te,ne)}const re=h(oe,[["render",ce],["__scopeId","data-v-ccfb70ef"]]),le={key:0,class:"login-block"},ie={key:1,class:"login-block"},de=["href"],_e={key:1,class:"button"},ue={key:2,class:"login-block"},pe=g({__name:"LoginBlock",setup(e){const n=x(!1),{loading:i,result:a,refetch:_}=K(()=>$.get());async function y(){const p=prompt(`Login to our console at https://cloud.abstra.io and get an API Key to deploy your Projects.

Enter your API Key here:`);!p||(await $.create(p),_())}async function u(){!a.value||(await a.value.delete(),_())}async function l(){!a.value||(n.value=!0,confirm("Are you sure you want to deploy this project to Abstra Cloud?")&&(await M.deploy(),window.open(`https://cloud.abstra.io/projects/${a.value.projectId}/builds`,"_blank")),n.value=!1)}return(p,d)=>f(i)?(o(),t("div",le,"loading...")):f(a)?(o(),t("div",ie,[c("a",{class:"button",href:`https://cloud.abstra.io/projects/${f(a).projectId}`,target:"_blank"},"Go to console ",8,de),n.value?(o(),t("button",_e,"Deploying...")):(o(),t("button",{key:0,class:"button",onClick:l},"Deploy")),c("button",{class:"button",onClick:u},"Logout")])):(o(),t("div",ue,[c("button",{class:"button",onClick:y},"Login to deploy")]))}});const be=h(pe,[["__scopeId","data-v-d5de8b44"]]),fe=e=>(L("data-v-77e07499"),e=e(),C(),e),he=fe(()=>c("div",{class:"grow"},null,-1)),ye={class:"workspace"},me=g({__name:"Workspace",setup(e){return(n,i)=>{const a=W("router-view");return o(),t(m,null,[c("nav",null,[r(re),he,r(q),r(be)]),c("div",ye,[r(ee,{class:"sidebar"}),r(a)])],64)}}});const Se=h(me,[["__scopeId","data-v-77e07499"]]);export{Se as default};
//# sourceMappingURL=Workspace.47875575.js.map
