import { h } from "@stencil/core";
export class EclAccordionItem {
    constructor() {
        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 is() { return "ecl-accordion-item"; }
    static get originalStyleUrls() {
        return {
            "$": ["build/styles/ecl-accordion-item.css"]
        };
    }
    static get styleUrls() {
        return {
            "$": ["build/styles/ecl-accordion-item.css"]
        };
    }
    static get assetsDirs() { return ["build"]; }
    static get properties() {
        return {
            "styleClass": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "string",
                    "resolved": "string",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": ""
                },
                "attribute": "style-class",
                "reflect": false
            },
            "label": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "string",
                    "resolved": "string",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": ""
                },
                "attribute": "label",
                "reflect": false
            },
            "itemId": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "string",
                    "resolved": "string",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": ""
                },
                "attribute": "item-id",
                "reflect": false
            },
            "titleId": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "string",
                    "resolved": "string",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": ""
                },
                "attribute": "title-id",
                "reflect": false
            },
            "expanded": {
                "type": "boolean",
                "mutable": false,
                "complexType": {
                    "original": "boolean",
                    "resolved": "boolean",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": ""
                },
                "attribute": "expanded",
                "reflect": true
            },
            "theme": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "string",
                    "resolved": "string",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": ""
                },
                "attribute": "theme",
                "reflect": false,
                "defaultValue": "'ec'"
            }
        };
    }
    static get elementRef() { return "el"; }
}
//# sourceMappingURL=ecl-accordion-item.js.map
