import{a as b}from"./asyncComputed-Pl8A6UUZ.js";import{e as h,an as k,N as I,f as l,p as C,g as x,j as e,h as o,m as n,w as t,ao as m,k as c,t as s,i as p,B,J as u,s as N}from"./jwt-decode.esm-og2W_mys.js";import{C as _,A as v}from"./router-C9ojQjj-.js";import{O as z}from"./organization-7oMSYFNi.js";import"./tables-BDU7F3na.js";import{L as D}from"./LoadingContainer-BaV6UdxR.js";import"./ts.worker-BQuKpghy.js";import"./record-D5CgGTou.js";import"./string-zda83L05.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]="5d7ef81f-c509-440f-ad5c-3d9a132dab12",a._sentryDebugIdIdentifier="sentry-dbid-5d7ef81f-c509-440f-ad5c-3d9a132dab12")}catch{}})();const U={key:1},j=["src"],F=h({__name:"Billing",setup(a){const f=k().params.organizationId,{loading:y,result:r}=b(async()=>{const d=await z.get(f),g=await d.getUsageReportUrl();return{organization:d,reportUrl:g}});I(()=>{location.search.includes("upgrade")&&_.showNewMessage("I want to upgrade my plan")});const w=()=>_.showNewMessage("I want to upgrade my plan");return(d,g)=>e(y)?(o(),l(D,{key:0})):e(r)?(o(),C("div",U,[n(e(u),{justify:"space-between",align:"center"},{default:t(()=>[n(e(m),{level:3},{default:t(()=>[c(s(e(p).translate("i18n_billing_current_plan"))+" "+s(e(r).organization.coalescedPlan),1)]),_:1}),n(e(B),{type:"primary",onClick:w},{default:t(()=>[c(s(e(p).translate("i18n_billing_upgrade")),1)]),_:1})]),_:1}),n(e(v),{style:{"margin-top":"0"}}),e(r).organization.hasUsageReport?(o(),l(e(u),{key:0,align:"center",justify:"center"},{default:t(()=>[N("iframe",{src:e(r).reportUrl,frameborder:"0",style:{width:"1000px",height:"1700px"}},null,8,j)]),_:1})):(o(),l(e(u),{key:1,align:"center",justify:"center"},{default:t(()=>[n(e(m),{level:4},{default:t(()=>[c(s(e(p).translate("i18n_billing_no_usage_report")),1)]),_:1})]),_:1}))])):x("",!0)}});export{F as default};
//# sourceMappingURL=Billing-DBM4ityI.js.map
