${this.value?i`
-
-
+
+ ${this._renderSelectionLoading()}
- `:l}
-
`:l}
- `}renderPicker(){return this._isMobile?i`
- `}_renderDesktopControl(e){return i`
`}_renderMobileControl(e){return i`
`}async _renderOptions(){let e=[],t=0;return typeof this.items=="function"?e=await this.items(this._searchValue):e=await this.items,Array.isArray(e)&&(this._searchValue&&this.filterItems&&typeof this.filterItems=="function"?e=await this.filterItems(this._searchValue,e):e=e.filter(s=>this._filterOption(s)),t=e.length),t===0?this._renderEmptyOptions():this._renderItems(e)}_renderItems(e){return e.map(t=>this._renderOption(t))}_renderEmptyOptions(){return i`
${this.emptyMessage}
`}_filterOption(e){return this._searchValue?typeof e=="string"?e.toString().toLowerCase().includes(this._searchValue.toLowerCase()):!this.displayField||!e.hasOwnProperty(this.displayField)?!0:e[this.displayField].toString().toLowerCase().includes(this._searchValue.toLowerCase()):!0}_renderOption(e){return i`
+
this._onItemClick(e)}">
- ${this.renderItem?i` `:typeof e!="string"&&this.displayField?e[this.displayField]:e}
-
`}renderLoading(){return i`
`}renderLabel(){return super.renderLabel(!0)}};r([p("#select")],t.prototype,"_selectElement",2),r([p("#searchField")],t.prototype,"_searchElement",2),r([a({reflect:!0,converter:{toAttribute(n){var h;try{return!n||typeof n=="string"?n:(h=JSON.stringify(n))!=null?h:null}catch(e){return n}},fromAttribute(n){try{return n&&typeof n=="string"&&(n.includes("{")||n.includes("["))?JSON.parse(n):n}catch(h){return n}}}})],t.prototype,"value",2),r([a({type:Array,reflect:!0})],t.prototype,"items",2),r([a({type:String,reflect:!0,attribute:"display-field"})],t.prototype,"displayField",2),r([a({type:String,reflect:!0,attribute:"id-field"})],t.prototype,"idField",2),r([a({type:String,reflect:!0,attribute:"empty-message"})],t.prototype,"emptyMessage",2),r([a({type:Boolean,reflect:!0})],t.prototype,"searchable",2),r([a({type:Object,reflect:!1})],t.prototype,"renderItem",2),r([a({type:Object,reflect:!1})],t.prototype,"renderSelection",2),r([a({type:Object,reflect:!1})],t.prototype,"filterItems",2),r([d()],t.prototype,"_popUp",2),r([d()],t.prototype,"_bottomOfViewport",2),r([d()],t.prototype,"_isMobile",2),r([d()],t.prototype,"_searchValue",2),t=r([b("omni-select")],t);export{t as a};
-//# sourceMappingURL=chunk.WK46GQ45.js.map
+ ${this.renderItem?i`
+
+ ${this._renderItemLoading()}
+
+ `:typeof e!="string"&&this.displayField?e[this.displayField]:e}
+
+ ${this._renderOptionSeparator(e)}
+ `}_renderItemLoading(){let e=this.querySelector("[slot=loading_indicator]");if(e){let t=e.cloneNode(!0);return t.setAttribute("slot","loading_indicator"),t.setAttribute("style","height: 100%; max-width: 24px;"),t}return a}_renderOptionSeparator(e){return a}renderLoading(){return i`