import { h } from "@stencil/core";
export class EclNavigationList {
    constructor() {
        this.theme = 'ec';
        this.column = 2;
        this.styleClass = undefined;
    }
    getClass() {
        const styleClasses = [
            `ecl-navigation-list`,
            `ecl-navigation-list--col-${this.column}`,
            this.styleClass
        ];
        return styleClasses.join(' ');
    }
    componentDidRender() {
        // Clean the html to make the zebra work,.
        const items = this.el.querySelectorAll('.ecl-navigation-list__item');
        if (items) {
            this.el.querySelector('.ecl-navigation-list').innerHTML = '';
            this.el.querySelector('.ecl-navigation-list').append(...items);
        }
        const blocks = this.el.querySelectorAll('.ecl-content-block');
        if (blocks) {
            blocks.forEach((block) => {
                block.classList.add('ecl-navigation-list__content-block', `sc-ecl-navigation-list-${this.theme}`);
            });
        }
    }
    render() {
        return (h("div", { class: this.getClass() }, h("slot", null)));
    }
    static get is() { return "ecl-navigation-list"; }
    static get encapsulation() { return "scoped"; }
    static get originalStyleUrls() {
        return {
            "ec": ["./build/styles/ecl-navigation-list-ec.css"],
            "eu": ["./build/styles/ecl-navigation-list-eu.css"]
        };
    }
    static get styleUrls() {
        return {
            "ec": ["build/styles/ecl-navigation-list-ec.css"],
            "eu": ["build/styles/ecl-navigation-list-eu.css"]
        };
    }
    static get properties() {
        return {
            "theme": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "string",
                    "resolved": "string",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": ""
                },
                "attribute": "theme",
                "reflect": false,
                "defaultValue": "'ec'"
            },
            "column": {
                "type": "number",
                "mutable": false,
                "complexType": {
                    "original": "number",
                    "resolved": "number",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": ""
                },
                "attribute": "column",
                "reflect": false,
                "defaultValue": "2"
            },
            "styleClass": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "string",
                    "resolved": "string",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": ""
                },
                "attribute": "style-class",
                "reflect": false
            }
        };
    }
    static get elementRef() { return "el"; }
}
//# sourceMappingURL=ecl-navigation-list.js.map
