import{r as i,c as e,a as o,h as d}from"./p-wX3eJOEL.js";const t=class{constructor(o){i(this,o),this.menuSize=e(this,"menuSize",7),this.ifxDropdownMenuItem=e(this,"ifxDropdownMenuItem",7)}isOpen=!1;size="l";hideTopPadding=!1;get el(){return o(this)}menuSize;filteredItems=[];ifxDropdownMenuItem;handleMenuFilter(i){this.filterDropdownItems(i.detail)}handleDropdownItemValueEmission(i){this.ifxDropdownMenuItem.emit(i.detail)}filterDropdownItems(i){const e=Array.from(this.el.querySelectorAll("ifx-dropdown-item"));let o,d;const t=i.toUpperCase();for(let i=0;i<e.length;i++)o=e[i],d=o.textContent||o.innerText,d.toUpperCase().indexOf(t)>-1?o.setAttribute("hide",!1):o.setAttribute("hide",!0)}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"),e=this.el.querySelector("ifx-dropdown-header");this.hideTopPadding=!(!i&&!e)}render(){return d("div",{key:"f38b74a5ee24049d9f0b43d1cd1b9e69248ab49c",class:`dropdown-menu \n      ${this.isOpen?"show":""} \n      ${this.hideTopPadding?"hideTopPadding":""}\n      ${"s"===this.size?"small":""}`},d("slot",{key:"164f9659ea4294ef9da9bc5b2ca3e23c96f671d2"}))}};t.style=":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}";export{t as ifx_dropdown_menu}