import{r as t,c as e,h as i}from"./p-BIwHMk6j.js";const o=class{constructor(i){t(this,i),this.change=e(this,"change"),this.getOptionValue=t=>t.value,this.getAffixValue=t=>{if(t.value)return[t.value]},this.handleChangeOptions=(t,e=t=>t)=>i=>{i.stopPropagation(),this.change.emit(Object.assign(Object.assign({},this.value),{options:Object.assign(Object.assign({},this.value.options),{[t]:e(i.detail)||void 0})}))},this.handleChangeAffix=t=>e=>{e.stopPropagation(),this.change.emit(Object.assign(Object.assign({},this.value),{[t]:this.getAffixValue(e.detail)}))}}render(){return[this.renderNotation(),this.renderCompactDisplay(),this.renderAffix("prefix"),this.renderAffix("suffix")]}renderNotation(){const t=[{text:"Standard",value:"standard"},{text:"Compact",value:"compact"}],e=t.find((t=>{var e;return t.value===(null===(e=this.value.options)||void 0===e?void 0:e.notation)}));return i("limel-select",{label:"Notation",helperText:"The formatting that should be displayed for the number",options:t,value:e,onChange:this.handleChangeOptions("notation",this.getOptionValue)})}renderCompactDisplay(){const t=[{text:"Short",value:"short"},{text:"Long",value:"long"}],e=t.find((t=>{var e;return t.value===(null===(e=this.value.options)||void 0===e?void 0:e.compactDisplay)}));return i("limel-select",{label:"Compact display",options:t,value:e,onChange:this.handleChangeOptions("compactDisplay",this.getOptionValue)})}renderAffix(t){const e=[{text:"",value:""},{text:"Compact notation",value:"compact"}],o=e.find((e=>{var i;return e.value&&(null===(i=this.value[t])||void 0===i?void 0:i.includes(e.value))}));return i("limel-select",{label:t.charAt(0).toUpperCase()+t.slice(1),options:e,value:o,onChange:this.handleChangeAffix(t)})}};export{o as limebb_info_tile_decimal_format}