import { h } from "@stencil/core";
export class EclNavigationList {
    constructor() {
        this.theme = 'ec';
        this.column = 2;
    }
    getClass() {
        const styleClasses = [
            `ecl-navigation-list`,
            `ecl-navigation-list--col-${this.column}`,
            this.styleClass
        ];
        if (this.colorMode) {
            styleClasses.push(`ecl-color-mode--${this.colorMode}`);
        }
        return styleClasses.join(' ');
    }
    componentDidLoad() {
        // 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", { key: '3072a5a556797d6c18661bd207f71fc04a15a353', class: this.getClass() }, h("slot", { key: '2b9ad35563d52cbc88de333c19ba8bedc96ee12b' })));
    }
    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": ""
                },
                "getter": false,
                "setter": false,
                "reflect": false,
                "attribute": "theme",
                "defaultValue": "'ec'"
            },
            "column": {
                "type": "number",
                "mutable": false,
                "complexType": {
                    "original": "number",
                    "resolved": "number",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": ""
                },
                "getter": false,
                "setter": false,
                "reflect": false,
                "attribute": "column",
                "defaultValue": "2"
            },
            "styleClass": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "string",
                    "resolved": "string",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": ""
                },
                "getter": false,
                "setter": false,
                "reflect": false,
                "attribute": "style-class"
            },
            "colorMode": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "string",
                    "resolved": "string",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": ""
                },
                "getter": false,
                "setter": false,
                "reflect": false,
                "attribute": "color-mode"
            }
        };
    }
    static get elementRef() { return "el"; }
}
