import{d as r,b as c,c as i,t as d}from"./registerWidgets.92d2f644.js";(function(){try{var s=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},e=new Error().stack;e&&(s._sentryDebugIds=s._sentryDebugIds||{},s._sentryDebugIds[e]="97ffa7f0-651e-4bc5-af03-ef50c2ecb8d5",s._sentryDebugIdIdentifier="sentry-dbid-97ffa7f0-651e-4bc5-af03-ef50c2ecb8d5")}catch{}})();class f{async get(){return(await fetch("/_editor/api/login")).json()}async create(e){return(await fetch("/_editor/api/login",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({token:e})})).json()}async delete(){await fetch("/_editor/api/login",{method:"DELETE"})}}const n=new f;class o{constructor(e,t){this.projectId=e,this.authorId=t}static async get(){const e=await n.get();return e.logged?new o(e.project_id,e.author_id):null}static async create(e){const t=await n.create(e);if(!t.logged)throw new Error("Failed to login");return new o(t.project_id,t.author_id)}async delete(){return n.delete()}}const p=["href"],_=r({__name:"DocsButton",props:{path:{}},setup(s){return(e,t)=>{var a;return c(),i("a",{class:"docs-button",href:`https://docs.abstra.io/${(a=e.path)!=null?a:""}`,target:"_blank"}," Docs ",8,p)}}});const l=d(_,[["__scopeId","data-v-9fec5678"]]);export{l as D,o as L};
//# sourceMappingURL=DocsButton.cd1a97e5.js.map
