import{r as i,c as e,a as o,h as t}from"./p-Cby2wKoI.js";const d=()=>`:host{position:relative;z-index:1000}.dropdown-menu{display:none;visibility:hidden;flex-direction:column;width:224px;max-height:289px;min-width:224px;overflow-y:auto;background:#FFFFFF;box-shadow:0px 6px 9px 0px rgba(29, 29, 29, 0.1019607843);border:1px solid #EEEDED;padding:8px 4px;font-family:var(--ifx-font-family)}.dropdown-menu.small{max-height:266px;max-width:186px;overflow-y:auto}.dropdown-menu.hideTopPadding{padding-top:0px}.dropdown-menu.show{display:flex;visibility:visible}`;const s=class{constructor(o){i(this,o);this.menuSize=e(this,"menuSize",7);this.ifxDropdownMenuItem=e(this,"ifxDropdownMenuItem",7)}isOpen=false;size="l";hideTopPadding=false;get el(){return o(this)}menuSize;filteredItems=[];ifxDropdownMenuItem;handleMenuFilter(i){const e=i.detail;this.filterDropdownItems(e)}handleDropdownItemValueEmission(i){this.ifxDropdownMenuItem.emit(i.detail)}filterDropdownItems(i){const e=Array.from(this.el.querySelectorAll("ifx-dropdown-item"));let o,t;const d=i.toUpperCase();for(let i=0;i<e.length;i++){o=e[i];t=o.textContent||o.innerText;if(t.toUpperCase().indexOf(d)>-1){o.setAttribute("hide",false)}else{o.setAttribute("hide",true)}}}componentWillUpdate(){this.menuSize.emit(this.size)}componentWillLoad(){this.filteredItems=Array.from(this.el.querySelectorAll("ifx-dropdown-item"));const i=this.el.querySelector("ifx-search-field");const e=this.el.querySelector("ifx-dropdown-header");if(i||e){this.hideTopPadding=true}else this.hideTopPadding=false}render(){return t("div",{key:"fcf5b206dd0c37a3fde56b7d4ce62e04ce2c7a08",class:`dropdown-menu \n      ${this.isOpen?"show":""} \n      ${this.hideTopPadding?"hideTopPadding":""}\n      ${this.size==="s"?"small":""}`},t("slot",{key:"6fa9b0415d71ddf2c03b2903de966c60faf2f225"}))}};s.style=d();export{s as ifx_dropdown_menu};
//# sourceMappingURL=p-67583ec0.entry.js.map