import{a as w}from"./asyncComputed.f9fa4c71.js";import{d as h,ei as k,U as I,u as e,a as l,ac as x,f as n,b as t,h 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.32f71954.js";import{o as m,c as B}from"./router.29e08ea4.js";import{a as D}from"./organization.2c5a9815.js";import"./tables.94d324c3.js";import{L as N}from"./LoadingContainer.395f4c42.js";import"./index.2400150a.js";import"./record.41c9caee.js";import"./string.ff0b4ef9.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]="9e0ab2ee-cd18-419a-9027-0d49d2d817ba",a._sentryDebugIdIdentifier="sentry-dbid-9e0ab2ee-cd18-419a-9027-0d49d2d817ba")}catch{}})();const U={key:1},j=["src"],O=h({__name:"Billing",setup(a){const g=k().params.organizationId,{loading:y,result:r}=w(async()=>{const d=await D.get(g),f=await d.getUsageReportUrl();return{organization:d,reportUrl:f}});I(()=>{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(),x("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,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}))])):C("",!0)}});export{O as default};
//# sourceMappingURL=Billing.f1e5c3f8.js.map
