import { h } from "@stencil/core";
export class EclSpotlight {
    constructor() {
        this.styleClass = '';
        this.hasAnchor = true;
        this.colorMode = '';
        this.fullWidth = false;
        this.fontSize = 'm';
    }
    getClass() {
        const styleClasses = [
            `ecl-spotlight`,
            this.styleClass
        ];
        if (this.fontSize !== 'm') {
            styleClasses.push(`ecl-spotlight--font-${this.fontSize}`);
        }
        if (this.fullWidth) {
            styleClasses.push('ecl-spotlight--full-width');
        }
        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("section", { key: 'fc7657667a81c0da72c44d8562f5062bbd2c338a', class: this.getClass() }, this.header &&
            h("div", { key: '1debd30e1866b33af1d33b45e739ec492f46bbbc', class: "ecl-spotlight__header" }, h("div", { key: '18159fe408555b44aeca522825a3718a655bed7e', class: "ecl-container" }, h("slot", { key: '5a3f9fb3dbf54a883aec00a34dd551dcf011b62f', name: "header" }))), h("a", { key: 'd7b88dbb04e8d5a54a558ea15ce1b3c9909a67f0', href: this.path, class: "ecl-spotlight__link" }, this.image &&
            h("figure", { key: 'f43187d24e1b90134accfde39c916559a784a7df', class: "ecl-spotlight__picture-container" }, h("ecl-picture", { key: 'f06406c3dd90db88044651d4fb002a9fec7a013d', styleClass: `ecl-spotlight__picture sc-ecl-spotlight-${this.theme}`, image: this.image, imageAlt: this.imageAlt, imgClass: `ecl-spotlight__image sc-ecl-spotlight-${this.theme}`, "data-ecl-spotlight-image": true }, h("slot", { key: '7f4bcf47593230fd65bf4cade197c93726b2fa45', name: "sources" }))), h("div", { key: '2df66782b8372a504ddc3e9a5cc8eb9ee6adc2f5', class: "ecl-spotlight__container", "data-ecl-spotlight-container": true }, h("div", { key: '59b95989df1cf74edc4ff14c8cd6373bb5cdc367', class: "ecl-container" }, h("div", { key: '92984999384fc7e14d8d2ad091f203312e04f964', class: "ecl-spotlight__title" }, h("slot", { key: '38a2a7ba3dca15db833b7b006679cf05d2bb5bb3' })), this.hasAnchor &&
            h("div", { key: 'c972211eb9858892e1eb074d9fc532e101b3eb62', class: "ecl-spotlight__anchor", "aria-hidden": "true" }), this.credit &&
            h("footer", { key: 'a669c22a5c1f2d4341c702c0e61c44cb69b29dc2', class: "ecl-spotlight__credit" }, this.credit))))));
    }
    static get is() { return "ecl-spotlight"; }
    static get encapsulation() { return "scoped"; }
    static get originalStyleUrls() {
        return {
            "ec": ["./build/styles/ecl-spotlight-ec.css"],
            "eu": ["./build/styles/ecl-spotlight-eu.css"]
        };
    }
    static get styleUrls() {
        return {
            "ec": ["build/styles/ecl-spotlight-ec.css"],
            "eu": ["build/styles/ecl-spotlight-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"
            },
            "hasAnchor": {
                "type": "boolean",
                "mutable": false,
                "complexType": {
                    "original": "boolean",
                    "resolved": "boolean",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": ""
                },
                "getter": false,
                "setter": false,
                "reflect": false,
                "attribute": "has-anchor",
                "defaultValue": "true"
            },
            "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",
                "defaultValue": "''"
            },
            "path": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "string",
                    "resolved": "string",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": ""
                },
                "getter": false,
                "setter": false,
                "reflect": false,
                "attribute": "path"
            },
            "credit": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "string",
                    "resolved": "string",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": ""
                },
                "getter": false,
                "setter": false,
                "reflect": false,
                "attribute": "credit"
            },
            "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"
            },
            "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"
            },
            "fullWidth": {
                "type": "boolean",
                "mutable": false,
                "complexType": {
                    "original": "boolean",
                    "resolved": "boolean",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": ""
                },
                "getter": false,
                "setter": false,
                "reflect": false,
                "attribute": "full-width",
                "defaultValue": "false"
            },
            "header": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "string",
                    "resolved": "string",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": ""
                },
                "getter": false,
                "setter": false,
                "reflect": false,
                "attribute": "header"
            },
            "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": "'m'"
            }
        };
    }
}
