import { h } from "@stencil/core";
export class EclListIllustration {
    constructor() {
        this.variant = 'image';
        this.zebra = false;
        this.column = 1;
        this.fontSize = 'l';
        this.centered = false;
        this.iconInline = false;
        this.iconList = false;
        this.numberList = false;
        this.counterReset = true;
        this.counterStart = 0;
    }
    getClass() {
        const styleClasses = [
            `ecl-list-illustration`,
            `ecl-list-illustration--font-${this.fontSize}`,
            `ecl-list-illustration--col-${this.column}`,
            this.styleClass
        ];
        if (this.zebra) {
            styleClasses.push('ecl-list-illustration--zebra');
        }
        if (this.centered) {
            styleClasses.push('ecl-list-illustration--centered');
        }
        if (this.iconInline) {
            styleClasses.push('ecl-list-illustration--icon-inline');
        }
        if (this.iconList) {
            styleClasses.push('ecl-list-illustration--icon-list');
        }
        if (this.numberList) {
            styleClasses.push('ecl-list-illustration--number-list');
        }
        if (this.numberList && this.counterReset) {
            styleClasses.push('ecl-list-illustration--number-list-reset');
        }
        if (this.colorMode) {
            styleClasses.push(`ecl-color-mode--${this.colorMode}`);
        }
        return styleClasses.join(' ');
    }
    componentWillLoad() {
        var _a;
        this.theme = (_a = document.documentElement.getAttribute('data-ecl-theme')) !== null && _a !== void 0 ? _a : (this.theme || 'ec');
    }
    componentDidLoad() {
        // Clean the html to make the zebra work,.
        const items = this.el.querySelectorAll('.ecl-list-illustration__item');
        if (items) {
            this.el.querySelector('.ecl-list-illustration').innerHTML = '';
            this.el.querySelector('.ecl-list-illustration').append(...items);
        }
    }
    render() {
        return (h("ul", Object.assign({ key: '72b03cae415433c09dec3c0bfc962288adbb7be2', class: this.getClass() }, (this.numberList && this.counterReset
            ? { style: { '--ecl-list-illustration-counter-start': `${this.counterStart}` } }
            : {})), h("slot", { key: '777494187beca35fe26d6607bd327ea0ae12cca7' })));
    }
    static get is() { return "ecl-list-illustration"; }
    static get encapsulation() { return "scoped"; }
    static get originalStyleUrls() {
        return {
            "ec": ["./build/styles/ecl-list-illustration-ec.css"],
            "eu": ["./build/styles/ecl-list-illustration-eu.css"]
        };
    }
    static get styleUrls() {
        return {
            "ec": ["build/styles/ecl-list-illustration-ec.css"],
            "eu": ["build/styles/ecl-list-illustration-eu.css"]
        };
    }
    static get properties() {
        return {
            "theme": {
                "type": "string",
                "mutable": true,
                "complexType": {
                    "original": "string",
                    "resolved": "string",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": ""
                },
                "getter": false,
                "setter": false,
                "reflect": false,
                "attribute": "theme"
            },
            "variant": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "string",
                    "resolved": "string",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": ""
                },
                "getter": false,
                "setter": false,
                "reflect": false,
                "attribute": "variant",
                "defaultValue": "'image'"
            },
            "zebra": {
                "type": "boolean",
                "mutable": false,
                "complexType": {
                    "original": "boolean",
                    "resolved": "boolean",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": ""
                },
                "getter": false,
                "setter": false,
                "reflect": false,
                "attribute": "zebra",
                "defaultValue": "false"
            },
            "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": "1"
            },
            "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"
            },
            "fontSize": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "string",
                    "resolved": "string",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": ""
                },
                "getter": false,
                "setter": false,
                "reflect": false,
                "attribute": "font-size",
                "defaultValue": "'l'"
            },
            "centered": {
                "type": "boolean",
                "mutable": false,
                "complexType": {
                    "original": "boolean",
                    "resolved": "boolean",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": ""
                },
                "getter": false,
                "setter": false,
                "reflect": false,
                "attribute": "centered",
                "defaultValue": "false"
            },
            "iconInline": {
                "type": "boolean",
                "mutable": false,
                "complexType": {
                    "original": "boolean",
                    "resolved": "boolean",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": ""
                },
                "getter": false,
                "setter": false,
                "reflect": false,
                "attribute": "icon-inline",
                "defaultValue": "false"
            },
            "iconList": {
                "type": "boolean",
                "mutable": false,
                "complexType": {
                    "original": "boolean",
                    "resolved": "boolean",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": ""
                },
                "getter": false,
                "setter": false,
                "reflect": false,
                "attribute": "icon-list",
                "defaultValue": "false"
            },
            "numberList": {
                "type": "boolean",
                "mutable": false,
                "complexType": {
                    "original": "boolean",
                    "resolved": "boolean",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": ""
                },
                "getter": false,
                "setter": false,
                "reflect": false,
                "attribute": "number-list",
                "defaultValue": "false"
            },
            "counterReset": {
                "type": "boolean",
                "mutable": false,
                "complexType": {
                    "original": "boolean",
                    "resolved": "boolean",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": ""
                },
                "getter": false,
                "setter": false,
                "reflect": false,
                "attribute": "counter-reset",
                "defaultValue": "true"
            },
            "counterStart": {
                "type": "number",
                "mutable": false,
                "complexType": {
                    "original": "number",
                    "resolved": "number",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": ""
                },
                "getter": false,
                "setter": false,
                "reflect": false,
                "attribute": "counter-start",
                "defaultValue": "0"
            }
        };
    }
    static get elementRef() { return "el"; }
}
