'use strict';

Object.defineProperty(exports, '__esModule', { value: true });

const index = require('./index-6377956f.js');

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

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

const EclPicture = class {
  constructor(hostRef) {
    index.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 (index.h("picture", { class: this.getClass() }, index.h("slot", null), index.h("img", Object.assign({}, this.getImgAttr()))));
  }
  ;
};
EclPicture.style = {
  ec: eclPictureEcCss,
  eu: eclPictureEuCss
};

exports.ecl_picture = EclPicture;

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