import{p as e,H as t,c as i,h as r,t as a}from"./p-CHfEnK-2.js";import{d as s}from"./p-B5hDbbCP.js";import{d as l}from"./p-B92aihLU.js";const f=e(class extends t{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.ifxFilterSearchChange=i(this,"ifxFilterSearchChange",7)}get host(){return this}filterName;disabled=!1;filterValue;filterKey;showDeleteIcon=!1;filterOrientation="sidebar";placeholder;ifxFilterSearchChange;valueChanged(e){this.host.setAttribute("value",""+e)}handleFilterSearchChange(e){const t=this.host.parentElement.querySelector(`ifx-filter-search[filter-name="${this.filterName}"]`);if(t&&t!==this.host)throw 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}]}}static get style(){return".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}"}},[513,"ifx-filter-search",{filterName:[1,"filter-name"],disabled:[4],filterValue:[1025,"filter-value"],filterKey:[1,"filter-key"],filterOrientation:[1,"filter-orientation"],placeholder:[1],showDeleteIcon:[32]},[[0,"ifxInput","handleFilterSearchChange"]],{value:[{valueChanged:0}]}]),h=f,n=function(){"undefined"!=typeof customElements&&["ifx-filter-search","ifx-icon","ifx-search-field"].forEach((e=>{switch(e){case"ifx-filter-search":customElements.get(a(e))||customElements.define(a(e),f);break;case"ifx-icon":customElements.get(a(e))||s();break;case"ifx-search-field":customElements.get(a(e))||l()}}))};export{h as IfxFilterSearch,n as defineCustomElement}