import{r as e,c as i,a as t,h as a}from"./p-wX3eJOEL.js";const s=class{constructor(t){e(this,t),this.ifxFilterAccordionChange=i(this,"ifxFilterAccordionChange",7)}initialized=!1;get el(){return t(this)}expanded=!1;maxVisibleItems;count=0;totalItems=0;filterGroupName="";ifxFilterAccordionChange;componentWillLoad(){this.el.addEventListener("ifxListUpdate",this.handleCheckedChange)}componentDidLoad(){if(!this.initialized){const e=Array.from(this.el.querySelectorAll("ifx-list-entry")).filter((e=>"true"===e.getAttribute("value"))).map((e=>({label:e.getAttribute("label"),value:e.getAttribute("value"),type:e.getAttribute("type")})));this.count=e.length,this.initialized=!0}}handleCheckedChange=e=>{const i=e.detail.selectedItems;this.count=i.length,this.ifxFilterAccordionChange.emit({filterGroupName:this.filterGroupName,selectedItems:i})};disconnectedCallback(){this.el.removeEventListener("ifxListUpdate",this.handleCheckedChange)}toggleAccordion=e=>{e.stopPropagation(),this.expanded=!this.expanded};render(){return a("div",{key:"0740d98898997013417cf38f39e63a301be16dfd",class:"accordion "+(this.expanded?"expanded":"")},a("div",{key:"b44e498b3bff48715af1c2c6bdcf314762713618",class:"header "+(this.expanded?"expanded":""),onClick:this.toggleAccordion},a("div",{key:"88c0a5831935c7e651970ce44b24c09de3a0b149",class:"text-and-icon "+(this.expanded?"expanded":"")},a("div",{key:"9b45de6f6d50f5bc5486212c389e7b1bf01d89f4",class:"text"},a("span",{key:"8864f251b18fd6e95ded2c562b2f9a18aaed1747"},this.filterGroupName),a("ifx-indicator",{key:"525a7f528a09e9a2e45a2f55f9b38a5df02e436c",variant:"number",number:this.count})),a("ifx-icon",{key:"dac4cfdfd877430b37aa263acf66f4b3b1bb3669",class:this.expanded?"":"hidden",icon:"minus-16",onClick:this.toggleAccordion}),a("ifx-icon",{key:"676d3c7356ef81a4d6e353226ba67fed173e2bb0",class:this.expanded?"hidden":"",icon:"plus-16",onClick:this.toggleAccordion}))),this.expanded&&a("div",{key:"516286fe33b675b737d0eb832f7d280a619ca254",class:"filter-accordion-container"},a("slot",{key:"3031b8ad0800d733eb5262bc5b4b5ac90b293667",name:"list"})))}};s.style=".header{display:flex;align-items:flex-start;align-self:stretch;cursor:pointer;border-left:3px solid transparent}.text-and-icon{display:flex;padding:12px 16px 12px 20px;align-items:center;gap:16px;flex:1 0 0}.header.expanded{border-left:3px solid #0A8276}.text{display:flex;align-items:center;gap:8px;flex:1 0 0;color:#1D1D1D;font-size:16px;font-style:normal;font-weight:600;line-height:24px}.hidden{display:none}.accordion{border-bottom:1px solid #EEEDED}.filter-accordion-container{display:flex;padding:8px 16px 16px 20px;flex-direction:column;align-items:flex-start;gap:12px;align-self:stretch;border-left:3px solid #0A8276}::slotted(ifx-filter-entry:nth-child(n+7)){display:none}.link{display:flex;align-items:center;gap:8px}.show-more ::slotted(ifx-filter-entry:nth-child(n+7)){display:block}.show-more .show-more-link{display:none}";export{s as ifx_filter_accordion}