const i=(i,t)=>{const s=Object.assign(Object.assign({},i),{disabled:!1,invalid:!1,selected:!1,focused:!1,hidden:!1,multiline:!1});return t&&(s.disabled=void 0===t.disabled?s.disabled:t.disabled,s.invalid=void 0===t.invalid?s.invalid:t.invalid,s.selected=void 0===t.selected?s.selected:t.selected,s.focused=void 0===t.focused?s.focused:t.focused,s.hidden=void 0===t.hidden?s.hidden:t.hidden,s.multiline=void 0===t.multiline?s.multiline:t.multiline),s},t=t=>i({value:t.value,label:t.label},t);class s{connectedCallback(i){this.component=i,this.optionChanged()}async componentWillRender(){this.component.listEl&&(this.component.nativeOptions=await this.component.listEl.getValues())}hasPropOptions(){return this.component.options&&this.component.options.length>0}async optionChanged(){this.component.rawOptions=this.component.options.map(t),await this.component.valueUtil.updateInputContent()}async listenToOptionChange(i){var t;const s=await(null===(t=this.component.listEl)||void 0===t?void 0:t.getSelectedValues())||[];this.component.valueUtil.updateRawValueBySelection(s),this.component.multiple||(this.component.popupUtil.collapseList(),this.component.hasFocus&&(this.component.balBlur.emit(new FocusEvent("blur",{relatedTarget:this.component.el})),this.component.hasFocus=!1))}}export{s as D,i as n}