import { h } from "@stencil/core";
export class EclListIllustration {
    constructor() {
        this.theme = 'ec';
        this.variant = 'image';
        this.zebra = false;
        this.column = 1;
        this.styleClass = undefined;
        this.centered = false;
    }
    getClass() {
        const styleClasses = [
            `ecl-list-illustration`,
            `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');
        }
        return styleClasses.join(' ');
    }
    componentDidRender() {
        // 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("div", { class: this.getClass() }, h("slot", null)));
    }
    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": false,
                "complexType": {
                    "original": "string",
                    "resolved": "string",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": ""
                },
                "attribute": "theme",
                "reflect": false,
                "defaultValue": "'ec'"
            },
            "variant": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "string",
                    "resolved": "string",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": ""
                },
                "attribute": "variant",
                "reflect": false,
                "defaultValue": "'image'"
            },
            "zebra": {
                "type": "boolean",
                "mutable": false,
                "complexType": {
                    "original": "boolean",
                    "resolved": "boolean",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": ""
                },
                "attribute": "zebra",
                "reflect": false,
                "defaultValue": "false"
            },
            "column": {
                "type": "number",
                "mutable": false,
                "complexType": {
                    "original": "number",
                    "resolved": "number",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": ""
                },
                "attribute": "column",
                "reflect": false,
                "defaultValue": "1"
            },
            "styleClass": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "string",
                    "resolved": "string",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": ""
                },
                "attribute": "style-class",
                "reflect": false
            },
            "centered": {
                "type": "boolean",
                "mutable": false,
                "complexType": {
                    "original": "boolean",
                    "resolved": "boolean",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": ""
                },
                "attribute": "centered",
                "reflect": false,
                "defaultValue": "false"
            }
        };
    }
    static get elementRef() { return "el"; }
}
//# sourceMappingURL=ecl-list-illustration.js.map
