import{d as g,H as S,J as B,r as x,K as A,b as o,c as t,F as y,L as v,x as c,N as k,G as w,e as r,I,D as f,t as j,w as N,z as h,q as b,O as L,Q as D,a as O}from"./registerWidgets.cecc7add.js";import{d as T,w as W,a as E,c as F,m as K,b as P}from"./icons.a47594f6.js";import{T as R}from"./Tooltip.44f3c0f6.js";import{_ as V}from"./logo.084e5d7c.js";import{a as z}from"./asyncComputed.08fdcc30.js";import{W as G}from"./workspaces.9e1715c9.js";import{L as $,D as H}from"./DocsButton.87316217.js";import"./activeRecord.2a9ab687.js";import"./pubsub.a43e35aa.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]="ea92af8f-7aaf-44fd-9a09-dd5d56ebfbcc",e._sentryDebugIdIdentifier="sentry-dbid-ea92af8f-7aaf-44fd-9a09-dd5d56ebfbcc")}catch{}})();const M={class:"sidebar"},q={class:"section-name"},J=["onClick"],Q={class:"item-name"},U={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(),d=B(),a=x((u=d.name)!=null?u:"forms"),_=A(()=>[{name:"Runtime",items:[{name:"Forms",icon:T,path:"forms"},{name:"Hooks",icon:W,path:"hooks"},{name:"Dashes",icon:E,path:"dashes",beta:!0}]},{name:"Settings",items:[{name:"Style",icon:F,path:"style"},{name:"Sidebar",icon:K,path:"sidebar"}]}]),m=l=>{l.unavailable||(n.push(l.path),a.value=l.path)};return(l,p)=>(o(),t("div",M,[(o(!0),t(y,null,v(_.value,i=>(o(),t("div",{key:i.name,class:"section"},[c("span",q,k(i.name),1),(o(!0),t(y,null,v(i.items,s=>(o(),t("div",{key:s.name,role:"button",class:w(["item",{active:a.value===s.path,disabled:s.unavailable||i.cloud}]),tabindex:"0",onClick:ge=>m(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",Q,k(s.name),1),s.unavailable?(o(),t("span",U,"SOON")):f("",!0),s.beta?(o(),t("span",X,"BETA")):f("",!0),s.cloud?(o(),t("span",Y,"CLOUD")):f("",!0),s.warning?(o(),j(R,{key:3,class:"warning",text:s.warning,fixed:!0,top:18,left:18},{default:N(()=>[r(I,{path:h(P),fill:"#D35249",width:"20",height:"20"},null,8,["path"])]),_:2},1032,["text"])):f("",!0)],10,J))),128))]))),128))]))}});const ee=b(Z,[["__scopeId","data-v-7f7d195e"]]);const oe={},C=e=>(L("data-v-ccfb70ef"),e=e(),D(),e),te={class:"logo"},se=C(()=>c("img",{src:V,alt:"Abstra cloud logo"},null,-1)),ae=C(()=>c("span",null," Abstra ",-1)),ne=[se,ae];function ce(e,n){return o(),t("div",te,ne)}const re=b(oe,[["render",ce],["__scopeId","data-v-ccfb70ef"]]),le={key:0,class:"login-block"},de={key:1,class:"login-block"},ie=["href"],_e={key:1,class:"button"},ue={key:2,class:"login-block"},pe=g({__name:"LoginBlock",setup(e){const n=x(!1),{loading:d,result:a,refetch:_}=z(()=>$.get());async function m(){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 G.deploy(),window.open(`https://cloud.abstra.io/projects/${a.value.projectId}/builds`,"_blank")),n.value=!1)}return(p,i)=>h(d)?(o(),t("div",le,"loading...")):h(a)?(o(),t("div",de,[c("a",{class:"button",href:`https://cloud.abstra.io/projects/${h(a).projectId}`,target:"_blank"},"Go to console ",8,ie),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:m},"Login to deploy")]))}});const fe=b(pe,[["__scopeId","data-v-d5de8b44"]]),he=e=>(L("data-v-77e07499"),e=e(),D(),e),be=he(()=>c("div",{class:"grow"},null,-1)),me={class:"workspace"},ye=g({__name:"Workspace",setup(e){return(n,d)=>{const a=O("router-view");return o(),t(y,null,[c("nav",null,[r(re),be,r(H),r(fe)]),c("div",me,[r(ee,{class:"sidebar"}),r(a)])],64)}}});const Se=b(ye,[["__scopeId","data-v-77e07499"]]);export{Se as default};
//# sourceMappingURL=Workspace.50cff31b.js.map
