import { h } from "@stencil/core";
export class EclFactFiguresItem {
    getClass() {
        const styleClasses = [
            `ecl-fact-figures__item`,
            `sc-ecl-fact-figures-${this.theme}`,
            this.styleClass
        ];
        if (this.fontSize === 'm') {
            styleClasses.push('ecl-fact-figures__item--font-m');
        }
        return styleClasses.join(' ');
    }
    get iconSize() {
        return this.el.closest('ecl-fact-figures').getAttribute('icon-size');
    }
    get fontSize() {
        return this.el.closest('ecl-fact-figures').getAttribute('font-size');
    }
    componentWillLoad() {
        var _a;
        this.theme = (_a = document.documentElement.getAttribute('data-ecl-theme')) !== null && _a !== void 0 ? _a : (this.theme || 'ec');
    }
    render() {
        return (h("div", { key: '21a678319fa457c8982206238db1fb2f842d73c3', class: this.getClass() }, h("ecl-icon", { key: '08237ff364cb50a3f5ff4b60dd7a540518686156', icon: this.icon, size: this.iconSize || 'l', rotate: this.iconTransform, "style-class": `ecl-fact-figures__icon sc-ecl-fact-figures-item-${this.theme}` }), this.value && (h("div", { key: '871204fb454682bbb4ee9eff684b50e304c1ea8e', class: "ecl-fact-figures__value" }, this.value, this.itemTitle && (h("span", { key: 'ce9b9d5b987f396f865363fccb7d910d8a12a97f', class: "ecl-fact-figures__title" }, this.itemTitle)))), (!this.value && this.itemTitle) &&
            h("div", { key: 'c9ce3a3ae60798032129d28be3f5c35cb5c815fc', class: "ecl-fact-figures__title" }, this.itemTitle), h("div", { key: '1213f95f8160a010940577729e41844da8c67581', class: "ecl-fact-figures__description" }, h("slot", { key: '66009e78a15631ebbf1d28541096ef3e41a995dc' }))));
    }
    static get is() { return "ecl-fact-figures-item"; }
    static get encapsulation() { return "scoped"; }
    static get originalStyleUrls() {
        return {
            "ec": ["./build/styles/ecl-fact-figures-item-ec.css"],
            "eu": ["./build/styles/ecl-fact-figures-item-eu.css"]
        };
    }
    static get styleUrls() {
        return {
            "ec": ["build/styles/ecl-fact-figures-item-ec.css"],
            "eu": ["build/styles/ecl-fact-figures-item-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"
            },
            "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"
            },
            "icon": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "string",
                    "resolved": "string",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": ""
                },
                "getter": false,
                "setter": false,
                "reflect": false,
                "attribute": "icon"
            },
            "value": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "string",
                    "resolved": "string",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": ""
                },
                "getter": false,
                "setter": false,
                "reflect": false,
                "attribute": "value"
            },
            "itemTitle": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "string",
                    "resolved": "string",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": ""
                },
                "getter": false,
                "setter": false,
                "reflect": false,
                "attribute": "item-title"
            },
            "iconTransform": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "string",
                    "resolved": "string",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": ""
                },
                "getter": false,
                "setter": false,
                "reflect": false,
                "attribute": "icon-transform"
            }
        };
    }
    static get elementRef() { return "el"; }
}
