import { h } from "@stencil/core";
export class EclBlockquote {
    constructor() {
        this.styleClass = '';
        this.language = 'en';
    }
    getClass() {
        const styleClasses = [
            `ecl-blockquote`,
            this.styleClass
        ];
        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');
    }
    render() {
        return (h("figure", { key: '3b1251920d605e9406b0bdc3c20a7c9d84cd7966', class: this.getClass() }, this.image ?
            h("ecl-picture", { styleClass: `ecl-blockquote__picture sc-ecl-picture-${this.theme}`, imgClass: `ecl-blockquote__image sc-ecl-blockquote-${this.theme}`, image: this.image, imageAlt: this.imageAlt }, h("slot", { name: "sources" }))
            : '', h("div", { key: '95f3f052b27c66d539c76c36c6f4da563f9da4b1', class: "ecl-blockquote__body" }, h("blockquote", { key: '8e9c21f6783dfb70b0cb4c7c9e6957688f84d603', class: "ecl-blockquote__quote" }, h("p", { key: '80c8d4db7fdde0437532ff8108b4c97eac2c67d7', class: "ecl-blockquote__citation", lang: this.language }, h("slot", { key: '7e467bbf4dcdeb98d10e207236f94b8847978d00' }))), this.author ?
            h("footer", { class: "ecl-blockquote__attribution" }, h("cite", { class: "ecl-blockquote__author" }, this.author)) : '')));
    }
    static get is() { return "ecl-blockquote"; }
    static get encapsulation() { return "scoped"; }
    static get originalStyleUrls() {
        return {
            "ec": ["./build/styles/ecl-blockquote-ec.css"],
            "eu": ["./build/styles/ecl-blockquote-eu.css"]
        };
    }
    static get styleUrls() {
        return {
            "ec": ["build/styles/ecl-blockquote-ec.css"],
            "eu": ["build/styles/ecl-blockquote-eu.css"]
        };
    }
    static get properties() {
        return {
            "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",
                "defaultValue": "''"
            },
            "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"
            },
            "image": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "string",
                    "resolved": "string",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": ""
                },
                "getter": false,
                "setter": false,
                "reflect": false,
                "attribute": "image"
            },
            "author": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "string",
                    "resolved": "string",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": ""
                },
                "getter": false,
                "setter": false,
                "reflect": false,
                "attribute": "author"
            },
            "imageAlt": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "string",
                    "resolved": "string",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": ""
                },
                "getter": false,
                "setter": false,
                "reflect": false,
                "attribute": "image-alt"
            },
            "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"
            },
            "language": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "string",
                    "resolved": "string",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": ""
                },
                "getter": false,
                "setter": false,
                "reflect": false,
                "attribute": "language",
                "defaultValue": "'en'"
            }
        };
    }
}
