import{a as h}from"./asyncComputed-BkrPdfiN.js";import{e as b,an as k,N as I,f as l,y as C,g as x,j as e,h as o,m as n,w as t,ao as _,k as c,t as s,i as u,B,J as p,D}from"./jwt-decode.esm-C2n6WQ0J.js";import{C as m,A as N}from"./router-DyRErWhl.js";import{O as v}from"./organization-Brtl8D5A.js";import"./tables-Bfw_MTCm.js";import{L as z}from"./LoadingContainer-BJfe7YWb.js";import"./ts.worker-BwqBcqxg.js";import"./string-DePeD5b-.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},i=new Error().stack;i&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[i]="d53fcff8-e129-4d74-a462-da2ad9e86de2",a._sentryDebugIdIdentifier="sentry-dbid-d53fcff8-e129-4d74-a462-da2ad9e86de2")}catch{}})();const U={key:1},j=["src"],T=b({__name:"Billing",setup(a){const f=k().params.organizationId,{loading:y,result:r}=h(async()=>{const d=await v.get(f),g=await d.getUsageReportUrl();return{organization:d,reportUrl:g}});I(()=>{location.search.includes("upgrade")&&m.showNewMessage("I want to upgrade my plan")});const w=()=>m.showNewMessage("I want to upgrade my plan");return(d,g)=>e(y)?(o(),l(z,{key:0})):e(r)?(o(),C("div",U,[n(e(p),{justify:"space-between",align:"center"},{default:t(()=>[n(e(_),{level:3},{default:t(()=>[c(s(e(u).translate("i18n_billing_current_plan"))+" "+s(e(r).organization.coalescedPlan),1)]),_:1}),n(e(B),{type:"primary",onClick:w},{default:t(()=>[c(s(e(u).translate("i18n_billing_upgrade")),1)]),_:1})]),_:1}),n(e(N),{style:{"margin-top":"0"}}),e(r).organization.hasUsageReport?(o(),l(e(p),{key:0,align:"center",justify:"center"},{default:t(()=>[D("iframe",{src:e(r).reportUrl,frameborder:"0",style:{width:"1000px",height:"1700px"}},null,8,j)]),_:1})):(o(),l(e(p),{key:1,align:"center",justify:"center"},{default:t(()=>[n(e(_),{level:4},{default:t(()=>[c(s(e(u).translate("i18n_billing_no_usage_report")),1)]),_:1})]),_:1}))])):x("",!0)}});export{T as default};
//# sourceMappingURL=Billing-e0aAGGS-.js.map
