import { h } from "@stencil/core";
export class EclPicture {
    constructor() {
        this.styleClass = '';
        this.theme = 'ec';
        this.image = undefined;
        this.imgClass = undefined;
        this.imageAlt = undefined;
    }
    getClass() {
        const styleClasses = [
            `ecl-picture`,
            this.styleClass
        ];
        return styleClasses.join(' ');
    }
    getImgAttr() {
        const attrs = {
            src: this.image,
        };
        if (this.imgClass) {
            attrs['class'] = this.imgClass;
        }
        if (this.imageAlt) {
            attrs['alt'] = this.imageAlt;
        }
        return attrs;
    }
    render() {
        return (h("picture", { class: this.getClass() }, h("slot", null), h("img", Object.assign({}, this.getImgAttr()))));
    }
    ;
    static get is() { return "ecl-picture"; }
    static get encapsulation() { return "scoped"; }
    static get originalStyleUrls() {
        return {
            "ec": ["./build/styles/ecl-picture-ec.css"],
            "eu": ["./build/styles/ecl-picture-eu.css"]
        };
    }
    static get styleUrls() {
        return {
            "ec": ["build/styles/ecl-picture-ec.css"],
            "eu": ["build/styles/ecl-picture-eu.css"]
        };
    }
    static get properties() {
        return {
            "styleClass": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "string",
                    "resolved": "string",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": ""
                },
                "attribute": "style-class",
                "reflect": false,
                "defaultValue": "''"
            },
            "theme": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "string",
                    "resolved": "string",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": ""
                },
                "attribute": "theme",
                "reflect": false,
                "defaultValue": "'ec'"
            },
            "image": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "string",
                    "resolved": "string",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": ""
                },
                "attribute": "image",
                "reflect": false
            },
            "imgClass": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "string",
                    "resolved": "string",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": ""
                },
                "attribute": "img-class",
                "reflect": false
            },
            "imageAlt": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "string",
                    "resolved": "string",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": ""
                },
                "attribute": "image-alt",
                "reflect": false
            }
        };
    }
}
//# sourceMappingURL=ecl-picture.js.map
