import { Component, Host, h, Prop, Event } from '@stencil/core';
export class UxplNotification {
  render() {
    if (this.type && this.message) {
      return (h(Host, null,
        h("div", { part: "notification", class: {
            "tc-notifications": true,
            'tc-notifications-success': this.type.toUpperCase() === 'SUCCESS',
            'tc-notifications-warning': this.type.toUpperCase() === 'WARNING',
            'tc-notifications-error': this.type.toUpperCase() === 'ERROR',
            'tc-notifications-info': this.type.toUpperCase() === 'INFO'
          } },
          !this.hideClose ?
            h("span", { class: { 'tc-close': true,
                'tc-success-close': this.type.toUpperCase() === 'SUCCESS',
                'tc-warn-close': this.type.toUpperCase() === 'WARNING',
                'tc-error-close': this.type.toUpperCase() === 'ERROR',
                'tc-info-close': this.type.toUpperCase() === 'INFO'
              }, onClick: () => { this.closed.emit(); } })
            :
              undefined,
          h("div", { class: "tc-notifications-message" }, this.message))));
    }
    else {
      return (h(Host, null,
        h("div", null)));
    }
  }
  static get is() { return "uxpl-notification"; }
  static get encapsulation() { return "shadow"; }
  static get originalStyleUrls() { return {
    "$": ["uxpl-notification.css"]
  }; }
  static get styleUrls() { return {
    "$": ["uxpl-notification.css"]
  }; }
  static get assetsDirs() { return ["assets"]; }
  static get properties() { return {
    "type": {
      "type": "string",
      "mutable": false,
      "complexType": {
        "original": "string",
        "resolved": "string",
        "references": {}
      },
      "required": false,
      "optional": false,
      "docs": {
        "tags": [],
        "text": ""
      },
      "attribute": "type",
      "reflect": false
    },
    "message": {
      "type": "string",
      "mutable": false,
      "complexType": {
        "original": "string",
        "resolved": "string",
        "references": {}
      },
      "required": false,
      "optional": false,
      "docs": {
        "tags": [],
        "text": ""
      },
      "attribute": "message",
      "reflect": false
    },
    "hideClose": {
      "type": "boolean",
      "mutable": false,
      "complexType": {
        "original": "boolean",
        "resolved": "boolean",
        "references": {}
      },
      "required": false,
      "optional": false,
      "docs": {
        "tags": [],
        "text": ""
      },
      "attribute": "hide-close",
      "reflect": false
    }
  }; }
  static get events() { return [{
      "method": "closed",
      "name": "closed",
      "bubbles": true,
      "cancelable": true,
      "composed": true,
      "docs": {
        "tags": [],
        "text": "Notification closed"
      },
      "complexType": {
        "original": "any",
        "resolved": "any",
        "references": {}
      }
    }]; }
}
