import{p as c,H as e,d as o,h as i,t}from"./p-BHHBMN0G.js";import{d as a}from"./p-C1DHlsEo.js";const s=c(class extends e{constructor(c){super(),!1!==c&&this.__registerHost(),this.toggleItem=o(this,"toggleItem"),this.handleClick=()=>{this.toggleItem.emit(this.itemId)}}getClass(){return["ecl-accordion__item","sc-ecl-accordion-"+this.theme,this.styleClass].join(" ")}componentWillLoad(){var c;this.theme=null!==(c=document.documentElement.getAttribute("data-ecl-theme"))&&void 0!==c?c:this.theme||"ec"}render(){const c=this.itemId+"-title",e=this.itemId+"-content";return i("div",{key:"0870354b49a3224af6070ff8e0f4bc6a6adf606b",class:this.getClass()},i("div",{key:"39dd262aef893ece8eda8fbd98a990fc31d04b35",class:"ecl-accordion__title sc-ecl-accordion-"+this.theme,id:c},i("button",{key:"59696a18242a15b9e06e2ef0b0ca9147399b78e9",type:"button","data-ecl-accordion-toggle":!0,onClick:this.handleClick,"aria-controls":e,"aria-expanded":this.expanded?"true":"false",class:"ecl-accordion__toggle sc-ecl-accordion-"+this.theme},i("span",{key:"63f6804e41104d64c4e671c94a3ed62dcf54d831",class:"ecl-accordion__toggle-flex sc-ecl-accordion-"+this.theme},i("span",{key:"f2f79d78ecfabe1f83acd997cb4f9c62e2ad1412",class:"ecl-accordion__toggle-title sc-ecl-accordion-"+this.theme},this.label),i("span",{key:"d79c0a92564d2a4ca00cf75b15bfbcd75b706eeb",class:"ecl-accordion__toggle-indicator sc-ecl-accordion-"+this.theme},i("ecl-icon",{key:"d94897417447af84f4ff5645d347a1d691c1e913",icon:"minus",size:"s","style-class":"ecl-accordion__toggle-icon ecl-accordion__toggle-icon--minus sc-ecl-accordion-"+this.theme}),i("ecl-icon",{key:"32c3d11dd0b228cd5bab5ee90fc9fb9662b8af9f",icon:"plus",size:"s","style-class":"ecl-accordion__toggle-icon ecl-accordion__toggle-icon--plus sc-ecl-accordion-"+this.theme}))))),i("div",{key:"9cc89a7d65aeaae44c88fbe7c974998da6f74f77",class:"ecl-accordion__content sc-ecl-accordion-"+this.theme,role:"region",id:e,"aria-labelledby":c,hidden:!0!==this.expanded},i("slot",{key:"4a07a2c41c24cf2b498f805facfaf96e01221c74"})))}static get assetsDirs(){return["build"]}get el(){return this}static get style(){return":host{display:block}.ecl-accordion__item.sc-ecl-accordion-ec{border-bottom-width:1px!important}.ecl-accordion__item.sc-ecl-accordion-eu{border-bottom-width:2px!important}.ecl-accordion__item.sc-ecl-accordion-eu:not(.is-first):before{display:none}.ecl-accordion__item.is-last{border-bottom:none!important}.ecl-accordion__item.sc-ecl-accordion-eu:not(.is-first) .ecl-accordion__toggle.sc-ecl-accordion-eu{border-radius:0!important}.ecl-accordion__item.sc-ecl-accordion-eu.is-last .ecl-accordion__toggle.sc-ecl-accordion-eu{border-end-end-radius:var(--s-xs)!important;border-end-start-radius:var(--s-xs)!important}.ecl-accordion__item.sc-ecl-accordion-eu.is-first .ecl-accordion__toggle.sc-ecl-accordion-eu{border-end-end-radius:0!important;border-end-start-radius:0!important}.ecl-accordion__item .ecl-accordion__toggle[aria-expanded=false][data-ecl-accordion-toggle] .ecl-accordion__toggle-indicator ecl-icon .ecl-accordion__toggle-icon--minus,.ecl-accordion__item .ecl-accordion__toggle[aria-expanded=true][data-ecl-accordion-toggle] .ecl-accordion__toggle-indicator ecl-icon .ecl-accordion__toggle-icon--plus:only-child{display:none}"}},[260,"ecl-accordion-item",{styleClass:[1,"style-class"],label:[1],itemId:[1,"item-id"],expanded:[516],theme:[1025]}]),d=s,l=function(){"undefined"!=typeof customElements&&["ecl-accordion-item","ecl-icon"].forEach((c=>{switch(c){case"ecl-accordion-item":customElements.get(t(c))||customElements.define(t(c),s);break;case"ecl-icon":customElements.get(t(c))||a()}}))};export{d as EclAccordionItem,l as defineCustomElement}