import{a as w}from"./asyncComputed.5a2bb5ad.js";import{d as h,U as k,u as e,a as d,ac as I,f as n,b as t,h as x,eA as C,o,A as _,g as c,t as s,i as u,bY as v,dj as p,e as z}from"./jwt-decode.esm.fbcfeaec.js";import{o as m,c as B}from"./router.ed823a0a.js";import{a as D}from"./organization.3348b7d7.js";import"./tables.76beaff5.js";import{L as N}from"./LoadingContainer.71a00e2a.js";import"./index.d9ce41fc.js";import"./record.63a637c8.js";import"./string.b10c2096.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]="5b1f6136-a327-4175-8034-a05fd361fd33",a._sentryDebugIdIdentifier="sentry-dbid-5b1f6136-a327-4175-8034-a05fd361fd33")}catch{}})();const U={key:1},A=["src"],O=h({__name:"Billing",setup(a){const f=C().params.organizationId,{loading:y,result:r}=w(async()=>{const l=await D.get(f),g=await l.getUsageReportUrl();return{organization:l,reportUrl:g}});k(()=>{location.search.includes("upgrade")&&m.showNewMessage("I want to upgrade my plan")});const b=()=>m.showNewMessage("I want to upgrade my plan");return(l,g)=>e(y)?(o(),d(N,{key:0})):e(r)?(o(),I("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(v),{type:"primary",onClick:b},{default:t(()=>[c(s(e(u).translate("i18n_billing_upgrade")),1)]),_:1})]),_:1}),n(e(B),{style:{"margin-top":"0"}}),e(r).organization.hasUsageReport?(o(),d(e(p),{key:0,align:"center",justify:"center"},{default:t(()=>[z("iframe",{src:e(r).reportUrl,frameborder:"0",style:{width:"1000px",height:"1700px"}},null,8,A)]),_: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{O as default};
//# sourceMappingURL=Billing.28a6634a.js.map
