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