import { r as registerInstance, h, g as getElement } from './index-e78ba223.js';

const eclAccordionItemCss = ":host{display:block}";

const EclAccordionItem = class {
    constructor(hostRef) {
        registerInstance(this, hostRef);
        this.styleClass = undefined;
        this.label = undefined;
        this.itemId = undefined;
        this.titleId = undefined;
        this.expanded = undefined;
        this.theme = 'ec';
    }
    getClass() {
        return [
            `ecl-accordion__item`,
            `sc-ecl-accordion-${this.theme}`,
            this.styleClass
        ].join(' ');
    }
    render() {
        return (h("div", { class: this.getClass(), id: this.itemId || null, "aria-labelledby": this.titleId || null }, h("h3", { class: `ecl-accordion__title sc-ecl-accordion-${this.theme}`, id: this.titleId || null }, h("button", { "data-ecl-accordion-toggle": true, "aria-controls": `${this.el.id}-content`, class: `ecl-accordion__toggle sc-ecl-accordion-${this.theme}`, "aria-expanded": this.expanded ? 'true' : 'false' }, h("span", { class: `ecl-accordion__toggle-flex sc-ecl-accordion-${this.theme}` }, h("span", { class: `ecl-accordion__toggle-indicator sc-ecl-accordion-${this.theme}` }, h("ecl-icon", { icon: this.expanded ? "minus" : 'plus', theme: this.theme, size: "m", "style-class": `ecl-accordion__toggle-icon sc-ecl-accordion-${this.theme}`, "data-ecl-accordion-icon": true })), h("span", { class: `ecl-accordion__toggle-title sc-ecl-accordion-${this.theme}` }, this.label)))), h("div", { class: `ecl-accordion__content sc-ecl-accordion-${this.theme}`, role: "region", id: `${this.el.id}-content`, hidden: this.expanded !== true }, h("slot", null))));
    }
    static get assetsDirs() { return ["build"]; }
    get el() { return getElement(this); }
};
EclAccordionItem.style = eclAccordionItemCss;

export { EclAccordionItem as ecl_accordion_item };

//# sourceMappingURL=ecl-accordion-item.entry.js.map