import { h } from '@stencil/core';
export class EclBanner {
  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;
    this.size = 'm';
  }
  getClass() {
    const styleClasses = [
      `ecl-banner`,
      `ecl-banner--${this.variant}`,
      `ecl-banner--${this.size}`,
      this.styleClass
    ];
    if (this.centered) {
      styleClasses.push('ecl-banner--centered');
    }
    if (this.fullWidth) {
      styleClasses.push('ecl-banner--full-width');
    }
    return styleClasses.join(' ');
  }
  render() {
    const imageBanners = [
      'text-box',
      'image-overlay',
      'text-highlight',
    ];
    return (h("section", { class: this.getClass() }, imageBanners.includes(this.variant) && this.image ?
      h("div", { class: "ecl-banner__image", style: { backgroundImage: "url(" + this.image + ")" } })
      : '', this.credit && this.variant != 'plain-background' ?
      h("div", { class: "ecl-banner__credit" }, this.credit) : '', h("div", { class: "ecl-container" }, h("div", { class: "ecl-banner__container" }, h("div", { class: "ecl-banner__content" }, this.bannerTitle ?
      h("div", { class: "ecl-banner__title" }, h("span", { class: "ecl-banner__title-text" }, this.bannerTitle)) : '', h("p", { class: "ecl-banner__description" }, h("span", { class: "ecl-banner__description-text" }, h("slot", null))), this.ctaLabel && this.ctaLink ?
      h("div", { class: "ecl-banner__cta" }, h("ecl-link", { variant: "cta", path: this.ctaLink, "style-class": `ecl-banner__link-cta sc-ecl-banner-${this.theme}` }, this.ctaLabel, h("ecl-icon", { icon: "corner-arrow", slot: "icon-after", transform: "rotate-90" })))
      : '')))));
  }
  static get is() { return "ecl-banner"; }
  static get encapsulation() { return "scoped"; }
  static get originalStyleUrls() {
    return {
      "ec": ["./build/styles/ecl-banner-ec.css"],
      "eu": ["./build/styles/ecl-banner-eu.css"]
    };
  }
  static get styleUrls() {
    return {
      "ec": ["./build/styles/ecl-banner-ec.css"],
      "eu": ["./build/styles/ecl-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
      },
      "size": {
        "type": "string",
        "mutable": false,
        "complexType": {
          "original": "string",
          "resolved": "string",
          "references": {}
        },
        "required": false,
        "optional": false,
        "docs": {
          "tags": [],
          "text": ""
        },
        "attribute": "size",
        "reflect": false,
        "defaultValue": "'m'"
      }
    };
  }
}
//# sourceMappingURL=ecl-banner.js.map
