import { h } from '@stencil/core';
export class EclCard {
  constructor() {
    this.styleClass = '';
    this.theme = 'ec';
    this.image = undefined;
    this.imageAlt = undefined;
  }
  getClass() {
    return [
      `ecl-card`,
      this.styleClass
    ].join(' ');
  }
  getImgAttr() {
    const attrs = {
      class: 'ecl-card__image',
      role: 'img',
    };
    if (this.imageAlt) {
      attrs['alt'] = this.imageAlt;
    }
    return attrs;
  }
  render() {
    return (h("article", { class: this.getClass() }, h("div", Object.assign({ style: { backgroundImage: "url(" + this.image + ")" } }, this.getImgAttr())), h("div", { class: "ecl-card__body" }, h("slot", null))));
  }
  static get is() { return "ecl-card"; }
  static get encapsulation() { return "scoped"; }
  static get originalStyleUrls() {
    return {
      "ec": ["./build/styles/ecl-card-ec.css"],
      "eu": ["./build/styles/ecl-card-eu.css"]
    };
  }
  static get styleUrls() {
    return {
      "ec": ["./build/styles/ecl-card-ec.css"],
      "eu": ["./build/styles/ecl-card-eu.css"]
    };
  }
  static get properties() {
    return {
      "styleClass": {
        "type": "string",
        "mutable": false,
        "complexType": {
          "original": "string",
          "resolved": "string",
          "references": {}
        },
        "required": false,
        "optional": false,
        "docs": {
          "tags": [],
          "text": ""
        },
        "attribute": "style-class",
        "reflect": false,
        "defaultValue": "''"
      },
      "theme": {
        "type": "string",
        "mutable": false,
        "complexType": {
          "original": "string",
          "resolved": "string",
          "references": {}
        },
        "required": false,
        "optional": false,
        "docs": {
          "tags": [],
          "text": ""
        },
        "attribute": "theme",
        "reflect": false,
        "defaultValue": "'ec'"
      },
      "image": {
        "type": "string",
        "mutable": false,
        "complexType": {
          "original": "string",
          "resolved": "string",
          "references": {}
        },
        "required": false,
        "optional": false,
        "docs": {
          "tags": [],
          "text": ""
        },
        "attribute": "image",
        "reflect": false
      },
      "imageAlt": {
        "type": "string",
        "mutable": false,
        "complexType": {
          "original": "string",
          "resolved": "string",
          "references": {}
        },
        "required": false,
        "optional": false,
        "docs": {
          "tags": [],
          "text": ""
        },
        "attribute": "image-alt",
        "reflect": false
      }
    };
  }
}
//# sourceMappingURL=ecl-card.js.map
