import { proxyCustomElement, HTMLElement, h } from '@stencil/core/internal/client';

const eclPictureEcCss = ".sc-ecl-picture-ec-h{display:contents}";

const eclPictureEuCss = ".sc-ecl-picture-eu-h{display:contents}";

const EclPicture = /*@__PURE__*/ proxyCustomElement(class EclPicture extends HTMLElement {
    constructor() {
        super();
        this.__registerHost();
        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 style() { return {
        ec: eclPictureEcCss,
        eu: eclPictureEuCss
    }; }
}, [38, "ecl-picture", {
        "styleClass": [1, "style-class"],
        "theme": [1],
        "image": [1],
        "imgClass": [1, "img-class"],
        "imageAlt": [1, "image-alt"]
    }]);
function defineCustomElement() {
    if (typeof customElements === "undefined") {
        return;
    }
    const components = ["ecl-picture"];
    components.forEach(tagName => { switch (tagName) {
        case "ecl-picture":
            if (!customElements.get(tagName)) {
                customElements.define(tagName, EclPicture);
            }
            break;
    } });
}

export { EclPicture as E, defineCustomElement as d };

//# sourceMappingURL=ecl-picture2.js.map