import{r as t}from"./p-c87337b7.js";import"./p-74149bb1.js";import{d as s}from"./p-5159d382.js";const o=class{constructor(s){t(this,s)}format(t){const o=s.decimalDigits(this.currency)?s.decimalDigits(this.currency):2;let r,i=t.length,e=t;""==e&&(e="0"),t.includes(".")?(r=t.indexOf("."),0==r&&(e="0"+e,r++),i=r,e=e.padEnd(r+o+1,"0"),e=e.substring(0,r+o+1)):(e+=".",r=e.length-1,e=e.padEnd(r+o+1,"0"));const n=Math.ceil(i/3)-1;if(n>0)for(let s=0;s<n;s++){const t=i-3*(n-s);e=e.slice(0,t)+" "+e.slice(t,e.length),i++}return e}render(){return[this.format("number"==typeof this.amount?this.amount.toString():this.amount)," ",this.currency]}static get style(){return".sc-smoothly-display-amount-h{display:block}[hidden].sc-smoothly-display-amount-h{display:none}"}};export{o as smoothly_display_amount};