import { r as registerInstance, h } from './index-e78ba223.js';

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

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

const EclPicture = class {
    constructor(hostRef) {
        registerInstance(this, hostRef);
        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()))));
    }
    ;
};
EclPicture.style = {
    ec: eclPictureEcCss,
    eu: eclPictureEuCss
};

export { EclPicture as ecl_picture };

//# sourceMappingURL=ecl-picture.entry.js.map