import { r as registerInstance, h } from './index-442cf464.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) {
    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 h("img", { src: this.src, alt: this.altText });
    }
    else if (this.iconName && this.isIcon) {
      return h("lu-icon", { name: this.src ? this.src : this.iconName, color: this.iconColor, size: this.iconSize });
    }
    else {
      return null;
    }
  }
};
CardImage.style = cardImageCss;

export { CardImage as lu_card_image };

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