import { h } from '@stencil/core';
export class EclHeroBanner {
  constructor() {
    this.theme = 'ec';
    this.styleClass = undefined;
    this.external = false;
    this.variant = 'display';
    this.fullWidth = false;
    this.bannerTitle = undefined;
    this.image = undefined;
    this.ctaLabel = undefined;
    this.ctaLink = undefined;
    this.centered = true;
    this.credit = undefined;
  }
  getClass() {
    const styleClasses = [
      `ecl-hero-banner`,
      `ecl-hero-banner--${this.variant}`,
      this.styleClass
    ];
    if (this.centered) {
      styleClasses.push('ecl-hero-banner--centered');
    }
    if (this.fullWidth) {
      styleClasses.push('ecl-hero-banner--full-width');
    }
    return styleClasses.join(' ');
  }
  render() {
    const imageBanners = [
      'image',
      'image-gradient',
      'image-shade',
    ];
    return (h("section", { class: this.getClass() }, imageBanners.includes(this.variant) && this.image ?
      h("div", { class: "ecl-hero-banner__image", style: { backgroundImage: "url(" + this.image + ")" } }) : '', imageBanners.includes(this.variant) && this.credit ?
      h("div", { class: "ecl-hero-banner__credit" }, this.credit) : '', h("div", { class: "ecl-container" }, h("div", { class: "ecl-hero-banner__container" }, h("div", { class: "ecl-hero-banner__content" }, this.bannerTitle ?
      h("div", { class: "ecl-hero-banner__title" }, this.bannerTitle) : '', h("p", { class: "ecl-hero-banner__description" }, h("span", { class: "ecl-hero-banner__description-text" }, h("slot", null))), this.ctaLabel && this.ctaLink ?
      h("div", { class: "ecl-hero-banner__cta" }, h("ecl-link", { variant: "cta", path: this.ctaLink, "style-class": `ecl-hero-banner__link-cta sc-ecl-hero-banner-${this.theme}` }, this.ctaLabel, h("ecl-icon", { icon: "corner-arrow", slot: "icon-after", transform: "rotate-90" })))
      : '')))));
  }
  static get is() { return "ecl-hero-banner"; }
  static get encapsulation() { return "scoped"; }
  static get originalStyleUrls() {
    return {
      "ec": ["./build/styles/ecl-hero-banner-ec.css"],
      "eu": ["./build/styles/ecl-hero-banner-eu.css"]
    };
  }
  static get styleUrls() {
    return {
      "ec": ["./build/styles/ecl-hero-banner-ec.css"],
      "eu": ["./build/styles/ecl-hero-banner-eu.css"]
    };
  }
  static get properties() {
    return {
      "theme": {
        "type": "string",
        "mutable": false,
        "complexType": {
          "original": "string",
          "resolved": "string",
          "references": {}
        },
        "required": false,
        "optional": false,
        "docs": {
          "tags": [],
          "text": ""
        },
        "attribute": "theme",
        "reflect": false,
        "defaultValue": "'ec'"
      },
      "styleClass": {
        "type": "string",
        "mutable": false,
        "complexType": {
          "original": "string",
          "resolved": "string",
          "references": {}
        },
        "required": false,
        "optional": false,
        "docs": {
          "tags": [],
          "text": ""
        },
        "attribute": "style-class",
        "reflect": false
      },
      "external": {
        "type": "boolean",
        "mutable": false,
        "complexType": {
          "original": "boolean",
          "resolved": "boolean",
          "references": {}
        },
        "required": false,
        "optional": false,
        "docs": {
          "tags": [],
          "text": ""
        },
        "attribute": "external",
        "reflect": false,
        "defaultValue": "false"
      },
      "variant": {
        "type": "string",
        "mutable": false,
        "complexType": {
          "original": "string",
          "resolved": "string",
          "references": {}
        },
        "required": false,
        "optional": false,
        "docs": {
          "tags": [],
          "text": ""
        },
        "attribute": "variant",
        "reflect": false,
        "defaultValue": "'display'"
      },
      "fullWidth": {
        "type": "boolean",
        "mutable": false,
        "complexType": {
          "original": "boolean",
          "resolved": "boolean",
          "references": {}
        },
        "required": false,
        "optional": false,
        "docs": {
          "tags": [],
          "text": ""
        },
        "attribute": "full-width",
        "reflect": false,
        "defaultValue": "false"
      },
      "bannerTitle": {
        "type": "string",
        "mutable": false,
        "complexType": {
          "original": "string",
          "resolved": "string",
          "references": {}
        },
        "required": false,
        "optional": false,
        "docs": {
          "tags": [],
          "text": ""
        },
        "attribute": "banner-title",
        "reflect": false
      },
      "image": {
        "type": "string",
        "mutable": false,
        "complexType": {
          "original": "string",
          "resolved": "string",
          "references": {}
        },
        "required": false,
        "optional": false,
        "docs": {
          "tags": [],
          "text": ""
        },
        "attribute": "image",
        "reflect": false
      },
      "ctaLabel": {
        "type": "string",
        "mutable": false,
        "complexType": {
          "original": "string",
          "resolved": "string",
          "references": {}
        },
        "required": false,
        "optional": false,
        "docs": {
          "tags": [],
          "text": ""
        },
        "attribute": "cta-label",
        "reflect": false
      },
      "ctaLink": {
        "type": "string",
        "mutable": false,
        "complexType": {
          "original": "string",
          "resolved": "string",
          "references": {}
        },
        "required": false,
        "optional": false,
        "docs": {
          "tags": [],
          "text": ""
        },
        "attribute": "cta-link",
        "reflect": false
      },
      "centered": {
        "type": "boolean",
        "mutable": false,
        "complexType": {
          "original": "boolean",
          "resolved": "boolean",
          "references": {}
        },
        "required": false,
        "optional": false,
        "docs": {
          "tags": [],
          "text": ""
        },
        "attribute": "centered",
        "reflect": false,
        "defaultValue": "true"
      },
      "credit": {
        "type": "string",
        "mutable": false,
        "complexType": {
          "original": "string",
          "resolved": "string",
          "references": {}
        },
        "required": false,
        "optional": false,
        "docs": {
          "tags": [],
          "text": ""
        },
        "attribute": "credit",
        "reflect": false
      }
    };
  }
}
//# sourceMappingURL=ecl-hero-banner.js.map
