import{C as a}from"./router-BhKBgDIv.js";import"./jwt-decode.esm-DyyavT6h.js";(function(){try{var s=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},t=new Error().stack;t&&(s._sentryDebugIds=s._sentryDebugIds||{},s._sentryDebugIds[t]="d529ed75-b185-40bc-91a1-d58cf6529b42",s._sentryDebugIdIdentifier="sentry-dbid-d529ed75-b185-40bc-91a1-d58cf6529b42")}catch{}})();class i{urlPath="organizations";async create(t){return a.post(`${this.urlPath}`,t)}async delete(t){await a.delete(`${this.urlPath}/${t}`)}async rename(t,e){await a.patch(`${this.urlPath}/${t}`,{name:e})}async list(){return a.get(`${this.urlPath}`)}async get(t){return a.get(`${this.urlPath}/${t}`)}async getUsageReportUrl(t){return a.get(`${this.urlPath}/${t}/usage-report`)}}const r=new i;class n{constructor(t){this.dto=t}static async list(){return(await r.list()).map(e=>new n(e))}static async create(t){const e=await r.create({name:t});return new n(e)}static async get(t){const e=await r.get(t);return new n(e)}static async rename(t,e){return r.rename(t,e)}get id(){return this.dto.id}get name(){return this.dto.name}get featureFlags(){return this.dto.featureFlags}get billingMetadata(){return this.dto.billingMetadata}get coalescedPlan(){return this.billingMetadata.plan??"No active plan"}get hasUsageReport(){return["Business","Abstra"].includes(this.coalescedPlan)}async getUsageReportUrl(){return r.getUsageReportUrl(this.id)}}export{n as O,i as a};
//# sourceMappingURL=organization-74sGTG_j.js.map
