import { Host, h } from '@stencil/core';
import { ElementIDUtils } from '@sankhyalabs/core';
const iconMap = {
  warn: "warning_triangle",
  critical: "close",
  success: "check"
};
export class EzAlert {
  constructor() {
    this.alertType = 'success';
  }
  componentWillRender() {
    this.dataElementId = ElementIDUtils.addIDInfo(this._element);
  }
  render() {
    return (h(Host, null, h("div", { class: `alert-container ${this.alertType}` }, h("div", null, h("ez-icon", Object.assign({}, { [ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME]: this.dataElementId }, { class: `alert-container__icon-${this.alertType}`, size: "large", iconName: iconMap[this.alertType] }))), h("div", Object.assign({}, { [ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME]: `${this.dataElementId}_text` }), h("slot", null)))));
  }
  static get is() { return "ez-alert"; }
  static get encapsulation() { return "shadow"; }
  static get originalStyleUrls() {
    return {
      "$": ["ez-alert.css"]
    };
  }
  static get styleUrls() {
    return {
      "$": ["ez-alert.css"]
    };
  }
  static get properties() {
    return {
      "alertType": {
        "type": "string",
        "mutable": false,
        "complexType": {
          "original": "'warn' | 'critical' | 'success'",
          "resolved": "\"critical\" | \"success\" | \"warn\"",
          "references": {}
        },
        "required": false,
        "optional": false,
        "docs": {
          "tags": [],
          "text": "Define a cor e o \u00EDcone a serem exibidos no componente."
        },
        "attribute": "alert-type",
        "reflect": true,
        "defaultValue": "'success'"
      }
    };
  }
  static get elementRef() { return "_element"; }
}
