import{a as w}from"./asyncComputed.29ba9357.js";import{d as h,U as k,u as e,a as l,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.7c9b757c.js";import{o as m,c as B}from"./router.95e6e4b6.js";import{a as D}from"./organization.45e092f2.js";import"./tables.4a013a6e.js";import{L as N}from"./LoadingContainer.b6d40f17.js";import"./index.33534fc9.js";import"./record.c6bfac6e.js";import"./string.fea0919a.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]="2eeed869-33e9-4f76-86bf-a16d13cad28a",a._sentryDebugIdIdentifier="sentry-dbid-2eeed869-33e9-4f76-86bf-a16d13cad28a")}catch{}})();const U={key:1},A=["src"],O=h({__name:"Billing",setup(a){const g=C().params.organizationId,{loading:y,result:r}=w(async()=>{const d=await D.get(g),f=await d.getUsageReportUrl();return{organization:d,reportUrl:f}});k(()=>{location.search.includes("upgrade")&&m.showNewMessage("I want to upgrade my plan")});const b=()=>m.showNewMessage("I want to upgrade my plan");return(d,f)=>e(y)?(o(),l(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(),l(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(),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{O as default};
//# sourceMappingURL=Billing.51703667.js.map
