import{r as t,h as e,g as i}from"./p-5bf73c0f.js";const s=class{constructor(e){t(this,e);this.styleClass="";this.theme="ec";this.label=undefined;this.path=undefined;this.level=undefined;this.subItems=false;this.expanded=false;this.lastClicked=undefined}clickedItem(t){this.lastClicked=t.target.closest(".ecl-category-filter__list-item")}getClass(){return[`ecl-category-filter__list-item`,`sc-ecl-category-filter-${this.theme}`,this.styleClass].join(" ")}getLinkClass(){const t=[`ecl-category-filter__item`,`sc-ecl-category-filter-${this.theme}`,`ecl-category-filter__item--level-${this.level}`,this.styleClass];if(this.subItems){t.push(`ecl-category-filter__item--has-children`)}return t.join(" ")}render(){const t={};if(this.subItems){t["aria-expanded"]="false"}if(this.expanded){t["aria-expanded"]="true"}return e("li",Object.assign({class:this.getClass()},t,{onClick:t=>this.clickedItem(t)}),this.path?e("ecl-link",{theme:this.theme,styleClass:this.getLinkClass(),path:this.path},this.label,this.subItems?e("ecl-icon",{theme:this.theme,styleClass:`ecl-category-filter__item-icon sc-ecl-category-filter-${this.theme}`,icon:this.level===1?"corner-arrow":"solid-arrow",size:this.level===1?"xs":"m",transform:this.level===1?"rotate-180":"rotate-90",slot:this.level===1?"icon-after":"icon-before"}):""):"",!this.path?this.label:"",this.subItems?e("ul",{class:`ecl-category-filter__list sc-ecl-category-filter-${this.theme}`},e("slot",null)):"")}get el(){return i(this)}};export{s as ecl_category_filter_item};
//# sourceMappingURL=p-0d73f719.entry.js.map