import{aL as f,a5 as g,aG as r}from"./llFuKhWI.js";import{_ as s,a as D}from"./CzSSHsEX.js";function d(i={}){var o,l;const n=i.locale??f.en_GB;let t=i.value??((o=i.number)==null?void 0:o.value),a=s({...((l=i.number)==null?void 0:l.options)??{},...i.options??{}}),m="";if(t==null)return i.placeholder??g.notAvailable;const e=t<1&&t>-1;i.formatAs==="million"?(t=t/r.million,m="m"):i.formatAs==="thousand"&&(t=t/r.thousand,m="k");const c={minimumFractionDigits:a.minimumFractionDigits,maximumFractionDigits:a.maximumFractionDigits},u=D({minimumFractionDigits:e?1:0,maximumFractionDigits:e?1:0},c);return a={signDisplay:"negative",...a,...u,style:"decimal"},`${new Intl.NumberFormat(n,a).format(t)}${i.hideSymbol?"":m}`}function p(i,n={}){var e;if(i===void 0)return i;const t=(e=i.options)==null?void 0:e.style;let a=i.value??null;t==="percent"&&typeof a=="number"&&(a=a*100);const m={...i.options,style:"decimal",minimumFractionDigits:1,maximumFractionDigits:1,...n};return{value:a,options:s(m)}}export{p as c,d as f};