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 h,t as f,eB as L,eC as C,a as W}from"./registerWidgets.b2d74d6b.js";import{d as E,w as F,a as N,c as O,m as P,b as R}from"./icons.9c4c14c4.js";import{T as V}from"./Tooltip.dce0688b.js";import{_ as z}from"./logo.084e5d7c.js";import{a as K}from"./asyncComputed.000dd401.js";import{W as M}from"./workspaces.855982a0.js";import{L as $,D as q}from"./DocsButton.5afef726.js";import"./activeRecord.ad458e5f.js";import"./pubsub.de7b160f.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]="4394bc23-0877-44b3-90e8-0b3644be4a5b",e._sentryDebugIdIdentifier="sentry-dbid-4394bc23-0877-44b3-90e8-0b3644be4a5b")}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:h(R),fill:"#D35249",width:"20",height:"20"},null,8,["path"])]),_:2},1032,["text"])):b("",!0)],10,U))),128))]))),128))]))}});const ee=f(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=f(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)=>h(i)?(o(),t("div",le,"loading...")):h(a)?(o(),t("div",ie,[c("a",{class:"button",href:`https://cloud.abstra.io/projects/${h(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=f(pe,[["__scopeId","data-v-d5de8b44"]]),he=e=>(L("data-v-77e07499"),e=e(),C(),e),fe=he(()=>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),fe,r(q),r(be)]),c("div",ye,[r(ee,{class:"sidebar"}),r(a)])],64)}}});const Se=f(me,[["__scopeId","data-v-77e07499"]]);export{Se as default};
//# sourceMappingURL=Workspace.9d6cf1e1.js.map
