import{r as e,c as t,h as i,a}from"./p-PqnYwNKt.js";const r=".sidebar-filter-search-wrapper{display:flex;padding:12px 16px 16px 16px;flex-direction:column;align-items:flex-start;align-self:stretch;gap:4px;font-family:var(--ifx-font-family);background:#EEEDED}.topbar-filter-search-wrapper{display:flex;flex-direction:column;align-items:flex-start;align-self:stretch;gap:4px;font-family:var(--ifx-font-family)}.topbar-filter-search-wrapper ifx-search-field{width:100%;}.filter-name{font-size:1rem;line-height:1.5rem;font-weight:600}";const s=class{constructor(i){e(this,i);this.ifxFilterSearchChange=t(this,"ifxFilterSearchChange",7);this.disabled=false;this.showDeleteIcon=false;this.filterOrientation="sidebar"}valueChanged(e){this.host.setAttribute("value",e.toString())}handleFilterSearchChange(e){const t=this.host.parentElement.querySelector(`ifx-filter-search[filter-name="${this.filterName}"]`);if(t&&t!==this.host){throw new Error(`A search filter with the name '${this.filterName}' already exists.`)}this.filterValue=e.detail;this.showDeleteIcon=this.filterValue!=="";this.ifxFilterSearchChange.emit({filterName:this.filterName,filterValue:this.filterValue,filterKey:this.filterKey})}render(){return i("div",{key:"295ee6cb35c92f5135c2208e96e2eedcd0b5bec7",class:`${this.filterOrientation==="sidebar"?"sidebar-filter-search-wrapper":"topbar-filter-search-wrapper"}`},i("div",{key:"b9f6d39d16614b2755fb64e31830d917c5a32be0",class:"filter-name"},this.filterName),i("ifx-search-field",{key:"0a14b2f04a7cacbeb3cd02d10a0f7234ba1528ab",placeholder:this.placeholder,"show-delete-icon":this.showDeleteIcon,disabled:this.disabled,value:this.filterValue}))}get host(){return a(this)}static get watchers(){return{value:["valueChanged"]}}};s.style=r;export{s as ifx_filter_search};
//# sourceMappingURL=p-29b3ad67.entry.js.map