import{a as b}from"./asyncComputed-Ab6ltgBh.js";import{a as h,ak as k,J as I,b as d,k as C,e as x,u as e,f as o,h as n,w as t,ao as _,g as c,t as s,i as u,B,F as p,n as v}from"./jwt-decode.esm-Dzy-9m8i.js";import{C as m,A as z}from"./router-DFKMVA7Q.js";import{O as D}from"./organization-ZhAJhUgH.js";import"./tables-B--iEE7v.js";import{L as N}from"./LoadingContainer-fxVpr7yD.js";import"./ts.worker-DQrt9nOI.js";import"./record-BJeTf0YU.js";import"./string-CBgg-bcW.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]="57563c5d-2c4d-411d-94ac-9048893134cf",a._sentryDebugIdIdentifier="sentry-dbid-57563c5d-2c4d-411d-94ac-9048893134cf")}catch{}})();const U={key:1},M=["src"],T=h({__name:"Billing",setup(a){const g=k().params.organizationId,{loading:y,result:r}=b(async()=>{const l=await D.get(g),f=await l.getUsageReportUrl();return{organization:l,reportUrl:f}});I(()=>{location.search.includes("upgrade")&&m.showNewMessage("I want to upgrade my plan")});const w=()=>m.showNewMessage("I want to upgrade my plan");return(l,f)=>e(y)?(o(),d(N,{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(z),{style:{"margin-top":"0"}}),e(r).organization.hasUsageReport?(o(),d(e(p),{key:0,align:"center",justify:"center"},{default:t(()=>[v("iframe",{src:e(r).reportUrl,frameborder:"0",style:{width:"1000px",height:"1700px"}},null,8,M)]),_:1})):(o(),d(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-CL1F5tYQ.js.map
