import{r as l,b3 as i,j as r,T as o,d as m}from"./main-D6SjkSWq.js";const u=l.memo(({value:s,valueInCents:t,currency:n})=>{const a=i({style:"currency",currency:n,currencyDisplay:"narrowSymbol"});let e=t?x(t,a):s;return(e==null||isNaN(e))&&(e=0),r.jsx(l.Fragment,{children:a.format(e)})});function x(s,t){const{minimumFractionDigits:n}=t.resolvedOptions(),a=Math.pow(10,n??2);return s/a}function j({price:s,variant:t="slash",className:n,priceClassName:a,periodClassName:e}){if(!s)return null;const c=r.jsx(o,{message:s.interval});return r.jsxs("div",{className:m("flex items-center gap-6",n),children:[r.jsx("div",{className:a,children:r.jsx(u,{value:s.amount/(s.interval_count??1),currency:s.currency})}),t==="slash"?r.jsxs("div",{className:e,children:[" / ",c]}):r.jsxs("div",{className:e,children:[r.jsx(o,{message:"per"})," ",r.jsx("br",{})," ",c]})]})}export{j as F,u as a};
