'use strict';

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

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

const cardImageCss = ":host{margin:0;padding:0;display:block;object-fit:contain}img{width:100%;height:100%;object-fit:inherit;object-position:inherit}";

const CardImage = class {
  constructor(hostRef) {
    index.registerInstance(this, hostRef);
    /**
     * If set to true this component will attempt to display as an icon
     */
    this.isIcon = false;
  }
  render() {
    if (this.src && this.altText && !this.isIcon) {
      return index.h("img", { src: this.src, alt: this.altText });
    }
    else if (this.iconName && this.isIcon) {
      return index.h("lu-icon", { name: this.src ? this.src : this.iconName, color: this.iconColor, size: this.iconSize });
    }
    else {
      return null;
    }
  }
};
CardImage.style = cardImageCss;

exports.lu_card_image = CardImage;

//# sourceMappingURL=lu-card-image.cjs.entry.js.map