var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
  return c > 3 && r && Object.defineProperty(target, key, r), r;
};
import { Element, Component, Host, h, Prop, Event } from '@stencil/core';
import { InjectVegaGlobalSlimmer, InjectVegaSlimmer } from 'vega-slimmer/core';
import { VegaComponentUsageRuntimeMetricsSlimmer } from '../../../helpers/slimmers/component-usage-runtime-metrics';
import { sanitizeVegaComponent } from '../../../utils/component';
import { createEventEmitSlimmer, } from '../../../helpers/event-manager/slimmers/event-emit-slimmer';
import { VegaClick } from '../../../helpers/event-manager/event-id/vega-event-id';
import { VegaRichTextEditorToolbarButtonRenderer } from './slimmers/renderers/vega-rich-text-editor-toolbar-button-renderer';
import { ChildNodesEventPreventSlimmer } from '../../../helpers/event-manager/slimmers/child-nodes-event-prevent-slimmer';
/**
+ * @vegaVersion 2.34.0
+ */
/**
 * This is an internal used component and shouldn't be used by clients,
 *    it doesn't show up in storybook either.
 */
export class VegaRichTextEditorToolbarButton {
  constructor() {
    this.globalSlimmers = {};
    this.vegaComponentUsageRuntimeMetricsSlimmer = new VegaComponentUsageRuntimeMetricsSlimmer();
    this.clickEventEmitter = createEventEmitSlimmer(VegaRichTextEditorToolbarButton, VegaClick);
    this.eventPrevent = new ChildNodesEventPreventSlimmer([VegaClick], () => this.host, {
      useCapture: true,
      customPreventHandle: (e) => {
        if (this.disabled) {
          e.stopImmediatePropagation();
        }
      },
    });
    this.renderer = new VegaRichTextEditorToolbarButtonRenderer();
    /**
     * Specifies whether the rich text editor toolbar button element is disabled.
     *
     * @vegaVersion 2.34.0
     */
    this.disabled = false;
    /**
     * Specifies whether the rich text editor toolbar button element is hidden.
     *
     * @vegaVersion 2.59.0
     */
    this.hidden = false;
    /**
     * Specifies whether the rich text editor toolbar button element is selected.
     *
     * @vegaVersion 2.34.0
     */
    this.selected = false;
    /**
     * Specifies whether the rich text editor toolbar button element is showArrowIcon.
     *
     * @vegaVersion 2.34.0
     */
    this.showArrowIcon = false;
    /**
     * Specifies whether the toolbar button in the rich text editor is represented by an icon.
     *
     * @vegaVersion 2.34.0
     */
    this.icon = '';
    /**
     * Specifies the color of the toolbar button icon in the rich text editor.
     *
     * @vegaVersion 2.34.0
     */
    this.iconColor = 'text-primary';
  }
  render() {
    return sanitizeVegaComponent(h(Host, null, this.renderer.render()), this.host);
  }
  static get is() { return "vega-rich-text-editor-toolbar-button"; }
  static get encapsulation() { return "shadow"; }
  static get originalStyleUrls() { return {
    "$": ["vega-rich-text-editor-toolbar-button.scss"]
  }; }
  static get styleUrls() { return {
    "$": ["vega-rich-text-editor-toolbar-button.css"]
  }; }
  static get properties() { return {
    "disabled": {
      "type": "boolean",
      "mutable": false,
      "complexType": {
        "original": "boolean",
        "resolved": "boolean",
        "references": {}
      },
      "required": false,
      "optional": false,
      "docs": {
        "tags": [{
            "name": "vegaVersion",
            "text": "2.34.0"
          }],
        "text": "Specifies whether the rich text editor toolbar button element is disabled."
      },
      "attribute": "disabled",
      "reflect": false,
      "defaultValue": "false"
    },
    "hidden": {
      "type": "boolean",
      "mutable": false,
      "complexType": {
        "original": "boolean",
        "resolved": "boolean",
        "references": {}
      },
      "required": false,
      "optional": false,
      "docs": {
        "tags": [{
            "name": "vegaVersion",
            "text": "2.59.0"
          }],
        "text": "Specifies whether the rich text editor toolbar button element is hidden."
      },
      "attribute": "hidden",
      "reflect": false,
      "defaultValue": "false"
    },
    "selected": {
      "type": "boolean",
      "mutable": false,
      "complexType": {
        "original": "boolean",
        "resolved": "boolean",
        "references": {}
      },
      "required": false,
      "optional": false,
      "docs": {
        "tags": [{
            "name": "vegaVersion",
            "text": "2.34.0"
          }],
        "text": "Specifies whether the rich text editor toolbar button element is selected."
      },
      "attribute": "selected",
      "reflect": false,
      "defaultValue": "false"
    },
    "showArrowIcon": {
      "type": "boolean",
      "mutable": false,
      "complexType": {
        "original": "boolean",
        "resolved": "boolean",
        "references": {}
      },
      "required": false,
      "optional": false,
      "docs": {
        "tags": [{
            "name": "vegaVersion",
            "text": "2.34.0"
          }],
        "text": "Specifies whether the rich text editor toolbar button element is showArrowIcon."
      },
      "attribute": "show-arrow-icon",
      "reflect": false,
      "defaultValue": "false"
    },
    "icon": {
      "type": "string",
      "mutable": false,
      "complexType": {
        "original": "string",
        "resolved": "string",
        "references": {}
      },
      "required": false,
      "optional": false,
      "docs": {
        "tags": [{
            "name": "vegaVersion",
            "text": "2.34.0"
          }],
        "text": "Specifies whether the toolbar button in the rich text editor is represented by an icon."
      },
      "attribute": "icon",
      "reflect": false,
      "defaultValue": "''"
    },
    "iconColor": {
      "type": "string",
      "mutable": false,
      "complexType": {
        "original": "TextColorsTokenType",
        "resolved": "\"text-primary\" | \"text-secondary\" | \"text-inverted-primary\" | \"text-inverted-secondary\" | \"text-black\" | \"text-white\" | \"text-brand\" | \"text-danger-link\" | \"text-danger-link-hover\" | \"text-danger-link-active\" | \"text-danger-link-focus\" | \"text-danger-link-visited\" | \"text-disabled\" | \"text-error\" | \"text-input-disabled\" | \"text-input-placeholder\" | \"text-link\" | \"text-link-hover\" | \"text-link-active\" | \"text-link-focus\" | \"text-link-visited\" | \"text-on-action\" | \"text-on-danger\" | \"text-on-disabled\" | \"text-sidebar-link\" | \"text-sidebar-link-hover\" | \"text-sidebar-link-selected\" | \"text-site-footer-link\" | \"text-site-footer-link-hover\" | \"text-site-footer-link-active\" | \"text-success\" | \"text-inverted-success\" | \"text-accent1-primary\" | \"text-accent2-primary\" | \"text-accent3-primary\" | \"text-accent4-primary\" | \"text-accent5-primary\" | \"text-accent6-primary\" | \"text-accent7-primary\" | \"text-accent8-primary\" | \"text-accent9-primary\" | \"text-accent10-primary\"",
        "references": {
          "TextColorsTokenType": {
            "location": "import",
            "path": "../../../types/design-token.type"
          }
        }
      },
      "required": false,
      "optional": false,
      "docs": {
        "tags": [{
            "name": "vegaVersion",
            "text": "2.34.0"
          }],
        "text": "Specifies the color of the toolbar button icon in the rich text editor."
      },
      "attribute": "icon-color",
      "reflect": false,
      "defaultValue": "'text-primary'"
    }
  }; }
  static get events() { return [{
      "method": "vegaClick",
      "name": "vegaClick",
      "bubbles": true,
      "cancelable": true,
      "composed": true,
      "docs": {
        "tags": [{
            "name": "vegaVersion",
            "text": "2.34.0"
          }],
        "text": "An event emitter notifying the click event of the button."
      },
      "complexType": {
        "original": "any",
        "resolved": "any",
        "references": {}
      }
    }, {
      "method": "click",
      "name": "click",
      "bubbles": true,
      "cancelable": true,
      "composed": true,
      "docs": {
        "tags": [{
            "name": "eventSemantics",
            "text": "namespace:native"
          }, {
            "name": "vegaVersion",
            "text": "2.34.0"
          }],
        "text": "An event emitter notifying the click event of the button."
      },
      "complexType": {
        "original": "any",
        "resolved": "any",
        "references": {}
      }
    }]; }
  static get elementRef() { return "host"; }
}
__decorate([
  InjectVegaGlobalSlimmer()
], VegaRichTextEditorToolbarButton.prototype, "globalSlimmers", void 0);
__decorate([
  InjectVegaSlimmer()
], VegaRichTextEditorToolbarButton.prototype, "vegaComponentUsageRuntimeMetricsSlimmer", void 0);
__decorate([
  InjectVegaSlimmer()
], VegaRichTextEditorToolbarButton.prototype, "clickEventEmitter", void 0);
__decorate([
  InjectVegaSlimmer()
], VegaRichTextEditorToolbarButton.prototype, "eventPrevent", void 0);
__decorate([
  InjectVegaSlimmer()
], VegaRichTextEditorToolbarButton.prototype, "renderer", void 0);
