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 { Component, Host, h, Element, State, Event, Watch } from '@stencil/core';
import { InjectVegaGlobalSlimmer, InjectVegaSlimmer, methodPlaceholder, } from 'vega-slimmer/core';
import { VegaComponentUsageRuntimeMetricsSlimmer } from '../../../../../helpers/slimmers/component-usage-runtime-metrics';
import { sanitizeVegaComponent } from '../../../../../utils/component';
import { SelectionWidgetRenderer } from './slimmers/renderers/selection-widget-renderer';
import { SelectionWidgetKeyboardController } from './slimmers/controllers/selection-widget-keyboard-controller';
/**
 * A selection widget for rich text table elements.
 * This is an internal used component.
 *
 * @vegaVersion 2.79.0
 */
export class VegaRichTextTableSelectionWidget {
  constructor() {
    this.globalSlimmers = {};
    this.vegaComponentUsageRuntimeMetricsSlimmer = new VegaComponentUsageRuntimeMetricsSlimmer();
    this.selectionWidgetRenderer = new SelectionWidgetRenderer();
    this.keyboardController = new SelectionWidgetKeyboardController();
    this.isSelected = false;
  }
  watchIsSelected(newValue) {
    methodPlaceholder(newValue);
  }
  render() {
    return sanitizeVegaComponent(h(Host, null, this.selectionWidgetRenderer.render()), this.host);
  }
  static get is() { return "vega-rich-text-table-selection-widget"; }
  static get encapsulation() { return "shadow"; }
  static get originalStyleUrls() { return {
    "$": ["vega-rich-text-table-selection-widget.scss"]
  }; }
  static get styleUrls() { return {
    "$": ["vega-rich-text-table-selection-widget.css"]
  }; }
  static get states() { return {
    "isSelected": {}
  }; }
  static get events() { return [{
      "method": "vegaRemove",
      "name": "vegaRemove",
      "bubbles": true,
      "cancelable": true,
      "composed": true,
      "docs": {
        "tags": [{
            "name": "vegaVersion",
            "text": "2.79.0"
          }],
        "text": "An event emitter notifying a delete action on the widget."
      },
      "complexType": {
        "original": "any",
        "resolved": "any",
        "references": {}
      }
    }]; }
  static get elementRef() { return "host"; }
  static get watchers() { return [{
      "propName": "isSelected",
      "methodName": "watchIsSelected"
    }]; }
}
__decorate([
  InjectVegaGlobalSlimmer()
], VegaRichTextTableSelectionWidget.prototype, "globalSlimmers", void 0);
__decorate([
  InjectVegaSlimmer()
], VegaRichTextTableSelectionWidget.prototype, "vegaComponentUsageRuntimeMetricsSlimmer", void 0);
__decorate([
  InjectVegaSlimmer()
], VegaRichTextTableSelectionWidget.prototype, "selectionWidgetRenderer", void 0);
__decorate([
  InjectVegaSlimmer()
], VegaRichTextTableSelectionWidget.prototype, "keyboardController", void 0);
