import{d as g,J as S,K as B,r as x,L as A,b as o,c as t,F as m,N as v,y as c,O as k,H as w,e as r,I,E as h,u as j,x as E,A as b,t as f,Q as L,R as C,a as N}from"./registerWidgets.a9b9c198.js";import{d as O,w as T,a as W,c as F,m as R,b as K}from"./icons.e4ff78f2.js";import{T as P}from"./Tooltip.72b7ac59.js";import{_ as V}from"./logo.084e5d7c.js";import{a as H}from"./asyncComputed.380e0794.js";import{W as M}from"./workspaces.3f458914.js";import{L as $,D as z}from"./DocsButton.0c022cf3.js";import"./activeRecord.ded96690.js";import"./pubsub.d6cf90d7.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]="ad72564d-0e2e-4105-85cb-4007376c9419",e._sentryDebugIdIdentifier="sentry-dbid-ad72564d-0e2e-4105-85cb-4007376c9419")}catch{}})();const G={class:"sidebar"},J={class:"section-name"},Q=["onClick"],U={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:O,path:"forms"},{name:"Hooks",icon:T,path:"hooks"},{name:"Dashes",icon:W,path:"dashes",beta:!0}]},{name:"Settings",items:[{name:"Style",icon:F,path:"style"},{name:"Sidebar",icon:R,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",J,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",U,k(s.name),1),s.unavailable?(o(),t("span",q,"SOON")):h("",!0),s.beta?(o(),t("span",X,"BETA")):h("",!0),s.cloud?(o(),t("span",Y,"CLOUD")):h("",!0),s.warning?(o(),j(P,{key:3,class:"warning",text:s.warning,fixed:!0,top:18,left:18},{default:E(()=>[r(I,{path:b(K),fill:"#D35249",width:"20",height:"20"},null,8,["path"])]),_:2},1032,["text"])):h("",!0)],10,Q))),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:V,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:_}=H(()=>$.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)=>b(i)?(o(),t("div",le,"loading...")):b(a)?(o(),t("div",ie,[c("a",{class:"button",href:`https://cloud.abstra.io/projects/${b(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 he=f(pe,[["__scopeId","data-v-d5de8b44"]]),be=e=>(L("data-v-77e07499"),e=e(),C(),e),fe=be(()=>c("div",{class:"grow"},null,-1)),ye={class:"workspace"},me=g({__name:"Workspace",setup(e){return(n,i)=>{const a=N("router-view");return o(),t(m,null,[c("nav",null,[r(re),fe,r(z),r(he)]),c("div",ye,[r(ee,{class:"sidebar"}),r(a)])],64)}}});const Se=f(me,[["__scopeId","data-v-77e07499"]]);export{Se as default};
//# sourceMappingURL=Workspace.2a812a2f.js.map
