import{r as e,c as i,a as t,h as r}from"./p-wX3eJOEL.js";const a=class{constructor(t){e(this,t),this.ifxFilterSearchChange=i(this,"ifxFilterSearchChange",7)}get host(){return t(this)}filterName;disabled=!1;filterValue;filterKey;showDeleteIcon=!1;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 r("div",{key:"3206401f6ed494648859e568273e59900ea4f52a",class:"sidebar"===this.filterOrientation?"sidebar-filter-search-wrapper":"topbar-filter-search-wrapper"},r("div",{key:"fc007f7e1f24b469b8100eab47e92b9f1fb9b0f5",class:"filter-name"},this.filterName),r("ifx-search-field",{key:"856c2e5f7621c436b08c80218747cefd32c12b50",placeholder:this.placeholder,"show-delete-icon":this.showDeleteIcon,disabled:this.disabled,value:this.filterValue}))}static get watchers(){return{value:[{valueChanged:0}]}}};a.style=".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}";export{a as ifx_filter_search}