import{h as d}from"./chunk-OBBRMBNY.js";import{r as i}from"./chunk-TF4WRPB4.js";var s=(()=>{class m{static{this.setParam=null}static{this.sys=null}static{this.locale="sl-SI"}static{this.formatting={datetime:{date:"dd.MM.yyyy"},numeral:{currencyCode:"EUR",decimalSeparator:",",thousandsSeparator:"."}}}}return m})();var f=class m{static currency(t,r,a=s.sys?.defaultDecimalPlacesPrice||2){if(!i.isSet(r))return m.decimal(t,a);let o={style:"currency",currency:r,minimumFractionDigits:s.sys?.defaultDecimalPlacesPrice,maximumFractionDigits:s.sys?.defaultDecimalPlacesPrice};return new Intl.NumberFormat(s.locale,o).format(t)}static decimal(t,r=s.sys?.defaultDecimalPlacesPrice||2,a=s.formatting.numeral.decimalSeparator,o=s.formatting.numeral.thousandsSeparator){let e=i.numToStr(i.isNumber(t)?t:i.strToFloat(t));i.isEmpty(e)&&(e="0"),e.indexOf(".")===-1&&i.isSet(r)&&r>0&&(e+=".0");let n=e.split("."),c=i.zeroPad(n[1]||"",r);e=`${n[0]}.${c}`;let l=e.indexOf(".");return l>-1&&a!=="."?(e=e.replace(".",a),e.substring(0,l+(r||0)+1)):e}static thousands(t,r=s.formatting.numeral.thousandsSeparator){let a=t.indexOf(".")>-1?t.indexOf("."):t.indexOf(","),o=t.substring(0,a),e="";for(let n=o.length-1;n>=0;n--){let c=o[n];e=(n>0&&(n+1)%3===0?r:"")+c+e}return e+t.substring(a)}static date(t,r=s.formatting.datetime.date,a="MMM d yyyy hh:mma"){return this.datetime(t,r,a)}static dateFromIso(t,r=s.formatting.datetime.date){if(!i.isSet(t)||t.length===0)return"";let a=d.fromISO(i.collapseWhitespace(t));return a.isValid?a.toFormat(r):(console.error("Invalid date format"),t)}static datetime(t,r,a="MMM d yyyy hh:mma"){if(i.notSet(t))return"";let o=d.fromFormat(i.collapseWhitespace(t),a);return o.isValid?o.toFormat(r):(console.error("Invalid date format"),t)}};export{s as a,f as b};
