function m(a,r=null){const s=r;if(s==null)return a;const t=s==null?void 0:s.currency,e=(s==null?void 0:s.currency_symbol)||(t==null?void 0:t.symbol);if(a===0&&(t!=null&&t.hideBreakdownIfZero))switch(t==null?void 0:t.symbolPosition){case"before":return`${e}0`;case"before_with_space":return`${e} 0`;case"after_with_space":return`0 ${e}`;default:return`0${e}`}const d=Math.abs(a).toFixed(t==null?void 0:t.decimals),[b,l]=d.split("."),o=b.replace(/\B(?=(\d{3})+(?!\d))/g,t==null?void 0:t.thousand),i=l?`${o}${t==null?void 0:t.decimal}${l}`:o,$=a<0?"-":"";switch(t==null?void 0:t.symbolPosition){case"before":return`${$}${e}${i}`;case"before_with_space":return`${$}${e} ${i}`;case"after_with_space":return`${$}${i} ${e}`;case"after":default:return`${$}${i}${e}`}}export{m as f};
//# sourceMappingURL=priceFormatter-Dg4GlACg.js.map
