import { h } from '@stencil/core';
export class EzRichToolbarItem {
  constructor() {
    this.icon = undefined;
    this.command = undefined;
    this.title = undefined;
    this.value = undefined;
  }
  async triggerAction() {
    this.actionTriggered.emit({ command: this.command, value: this.value });
  }
  render() {
    return (h("div", { id: `rich-toolbar-item-${this.icon}`, class: `rich-toolbar-item`, title: this.title, onClick: this.triggerAction.bind(this) }, h("ez-icon", { class: 'toolbar-item', iconName: this.icon })));
  }
  static get is() { return "ez-rich-toolbar-item"; }
  static get encapsulation() { return "scoped"; }
  static get originalStyleUrls() {
    return {
      "$": ["ez-rich-toolbar-item.css"]
    };
  }
  static get styleUrls() {
    return {
      "$": ["ez-rich-toolbar-item.css"]
    };
  }
  static get properties() {
    return {
      "icon": {
        "type": "string",
        "mutable": false,
        "complexType": {
          "original": "string",
          "resolved": "string",
          "references": {}
        },
        "required": false,
        "optional": false,
        "docs": {
          "tags": [],
          "text": ""
        },
        "attribute": "icon",
        "reflect": false
      },
      "command": {
        "type": "string",
        "mutable": false,
        "complexType": {
          "original": "string",
          "resolved": "string",
          "references": {}
        },
        "required": false,
        "optional": false,
        "docs": {
          "tags": [],
          "text": ""
        },
        "attribute": "command",
        "reflect": false
      },
      "title": {
        "type": "string",
        "mutable": false,
        "complexType": {
          "original": "string",
          "resolved": "string",
          "references": {}
        },
        "required": false,
        "optional": false,
        "docs": {
          "tags": [],
          "text": ""
        },
        "attribute": "title",
        "reflect": false
      },
      "value": {
        "type": "string",
        "mutable": false,
        "complexType": {
          "original": "string",
          "resolved": "string",
          "references": {}
        },
        "required": false,
        "optional": true,
        "docs": {
          "tags": [],
          "text": ""
        },
        "attribute": "value",
        "reflect": false
      }
    };
  }
  static get events() {
    return [{
        "method": "actionTriggered",
        "name": "actionTriggered",
        "bubbles": true,
        "cancelable": true,
        "composed": true,
        "docs": {
          "tags": [],
          "text": ""
        },
        "complexType": {
          "original": "RichToolbarCommand",
          "resolved": "RichToolbarCommand",
          "references": {
            "RichToolbarCommand": {
              "location": "import",
              "path": "../RichToolbarHelper"
            }
          }
        }
      }];
  }
}
