import{proxyCustomElement as t,HTMLElement as e,createEvent as i,h as o,transformTag as n}from"@stencil/core/internal/client";const s=t(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.change=i(this,"change",7),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 o("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 o("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"}],i=e.find((e=>{var i;return e.value&&(null===(i=this.value[t])||void 0===i?void 0:i.includes(e.value))}));return o("limel-select",{label:t.charAt(0).toUpperCase()+t.slice(1),options:e,value:i,onChange:this.handleChangeAffix(t)})}},[1,"limebb-info-tile-decimal-format",{value:[16]}]),l=s,a=function(){"undefined"!=typeof customElements&&["limebb-info-tile-decimal-format"].forEach((t=>{"limebb-info-tile-decimal-format"===t&&(customElements.get(n(t))||customElements.define(n(t),s))}))};export{l as LimebbInfoTileDecimalFormat,a as defineCustomElement}