import{r as e,c as i,a as t,h as a}from"./p-Cby2wKoI.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(t){e(this,t);this.ifxFilterSearchChange=i(this,"ifxFilterSearchChange",7)}get host(){return t(this)}filterName;disabled=false;filterValue;filterKey;showDeleteIcon=false;filterOrientation="sidebar";placeholder;ifxFilterSearchChange;valueChanged(e){this.host.setAttribute("value",e.toString())}handleFilterSearchChange(e){const i=this.host.parentElement.querySelector(`ifx-filter-search[filter-name="${this.filterName}"]`);if(i&&i!==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 a("div",{key:"3f79ee17d44f49aa638e27e0031103fb13109b41",class:`${this.filterOrientation==="sidebar"?"sidebar-filter-search-wrapper":"topbar-filter-search-wrapper"}`},a("div",{key:"463f29f7db59aeae88156325997081f88a4c6b43",class:"filter-name"},this.filterName),a("ifx-search-field",{key:"58e6c3238a9d7892ff7f30949932a6260392e3f4",placeholder:this.placeholder,"show-delete-icon":this.showDeleteIcon,disabled:this.disabled,value:this.filterValue}))}static get watchers(){return{value:[{valueChanged:0}]}}};s.style=r();export{s as ifx_filter_search};
//# sourceMappingURL=p-1518d134.entry.js.map