import{a as w}from"./asyncComputed-DyfgKCRs.js";import{e as h,an as k,N as I,f as d,y 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 u,B,J as p,D}from"./jwt-decode.esm-BTkSWSoY.js";import{C as _,A as N}from"./router-Dhyutz1M.js";import{O as v}from"./organization-BXLykhFT.js";import"./tables-rIQ95qBT.js";import{L as z}from"./LoadingContainer-DrHHo_f0.js";import"./ts.worker-BQIuSwVW.js";import"./record-ByQtEUH9.js";import"./string-BYKRCdEY.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]="2af28c8b-b88c-43b7-9866-d086d2e18986",a._sentryDebugIdIdentifier="sentry-dbid-2af28c8b-b88c-43b7-9866-d086d2e18986")}catch{}})();const U={key:1},j=["src"],F=h({__name:"Billing",setup(a){const g=k().params.organizationId,{loading:y,result:r}=w(async()=>{const l=await v.get(g),f=await l.getUsageReportUrl();return{organization:l,reportUrl:f}});I(()=>{location.search.includes("upgrade")&&_.showNewMessage("I want to upgrade my plan")});const b=()=>_.showNewMessage("I want to upgrade my plan");return(l,f)=>e(y)?(o(),d(z,{key:0})):e(r)?(o(),C("div",U,[n(e(p),{justify:"space-between",align:"center"},{default:t(()=>[n(e(m),{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:b},{default:t(()=>[c(s(e(u).translate("i18n_billing_upgrade")),1)]),_:1})]),_:1}),n(e(N),{style:{"margin-top":"0"}}),e(r).organization.hasUsageReport?(o(),d(e(p),{key:0,align:"center",justify:"center"},{default:t(()=>[D("iframe",{src:e(r).reportUrl,frameborder:"0",style:{width:"1000px",height:"1700px"}},null,8,j)]),_:1})):(o(),d(e(p),{key:1,align:"center",justify:"center"},{default:t(()=>[n(e(m),{level:4},{default:t(()=>[c(s(e(u).translate("i18n_billing_no_usage_report")),1)]),_:1})]),_:1}))])):x("",!0)}});export{F as default};
//# sourceMappingURL=Billing-DgTX4bNq.js.map
