import{Yl as n}from"./shared-0-C4kdVF7Y.js";import{Tt as r}from"./shared-1-3-6x7RKF.js";var t={USD:1,EUR:.8,GBP:.6,BRL:5,CAD:1.4,AUD:1.4,NZD:1.6,SGD:1.2};function e(){return n()?"usage":"usage_credits"}function i(e){const i=n(),{data:u}=r({cached:!0}),a=(u?.currency??"USD").toUpperCase(),l=i?1:t[a],s=i||void 0===l?"USD":a,o=l??1,c=e?.limit_dollars;if("number"!=typeof c||c<=0)return{currency:s,limit:null,used:null,remaining:null};const m=c*o,d=e?.utilization,f="number"==typeof d?Math.max(0,Math.min(100,d))/100*m:null;return{currency:s,limit:m,used:f,remaining:null!==f?m-f:null}}export{e as n,i as t};