import{r as e,g as t,h as r,d as s}from"./p-b3a13b6a.js";const o='pn-button-dropdown .pn-button-dropdown>pn-button>.pn-button{min-height:initial}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);white-space:nowrap;border-width:0}@media screen and (max-width: 767px){.sr-only-mobile{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);white-space:nowrap;border-width:0}}pn-bonus-progressbar-level{position:absolute;width:0.1rem;left:50%}pn-bonus-progressbar-level::after{content:"";width:0.1rem;position:absolute;left:0;border-left:1px dashed #9b1c2e;top:50%;transform:translateY(-50%);height:3rem}pn-bonus-progressbar-level:not([current]):nth-child(odd)::after{height:7rem;margin-top:0.6rem}.progressbar-level-percentage{font-size:0.75em;position:absolute;left:50%;transform:translateX(-50%);top:-3.2rem}[current]>.progressbar-level-percentage{display:none}pn-bonus-progressbar-level:not([current]):nth-child(odd) .progressbar-level-percentage{top:-4.8rem}.progressbar-level-value{font-size:0.75em;white-space:nowrap;position:absolute;left:50%;transform:translateX(-50%);top:2.3rem}[current]>.progressbar-level-value{top:-3.2rem}pn-bonus-progressbar-level:not([current]):nth-child(odd) .progressbar-level-value{top:4.2rem}';const i=o;const n=class{constructor(t){e(this,t);this.current=false;this.value=0;this.bonuspercentage="";this.visualpercentage=0;this.percentage=0;this.max=0;this.min=0;this.currency=""}get hostElement(){return t(this)}componentWillLoad(){this.max=parseInt(this.hostElement.parentElement.parentElement.getAttribute("max"),10);this.min=parseInt(this.hostElement.parentElement.parentElement.getAttribute("min"),10);this.currency=this.hostElement.parentElement.parentElement.getAttribute("currency");this.percentage=this.value/this.max*100;if(this.visualpercentage>0){return}this.visualpercentage=this.value===0?0:(this.value-this.min)/(this.max-this.min)*100}formatValue(){return`${this.value.toLocaleString("sv-SE",{maximumFractionDigits:0})} ${this.currency}`}render(){return r(s,{key:"00b80f6a445e99d2ba395fcef54e4138c4485d53",style:{left:`${this.visualpercentage}%`}},r("div",{key:"4a04a5b11d281fb92b94ea0dfb423df01a59b1f4",class:"progressbar-level-percentage"},this.bonuspercentage),r("div",{key:"de57ec39c15545fb1e854f9c2a9540c49885676e",class:"progressbar-level-value"},this.formatValue()))}};n.style=i;export{n as pn_bonus_progressbar_level};
//# sourceMappingURL=p-a079f703.entry.js.map