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 EventManager from './internal-vega-event-manager';
import { InjectVegaTelemetrySlimmer } from 'vega-slimmer/core';
import { createPublicAPIRuntimeMetricsSlimmer } from '../slimmers/runtime-metrics/create-public-api-runtime-metrics-slimmer';
import { VegaEventManagerRuntimeMetricsPayloadDefinition } from '../../constants/runtime-metrics-payload-definition/public-api/VegaEventManager/runtime-metrics-payload-definition';
/**
 * The VegaEventManager class provides methods for setting and retrieving event semantics configuration,
 * as well as getting the corresponding native event name for a given event.
 */
class VegaEventManager {
  constructor() {
    this.vegaPublicAPIRuntimeMetricsSlimmer = createPublicAPIRuntimeMetricsSlimmer(VegaEventManager, ['setSemantics', 'getSemantics', 'getEnabledEventIdsByComponent'], VegaEventManagerRuntimeMetricsPayloadDefinition);
  }
  /**
   * The function sets the semantics configuration for event management.
   *
   * @param {EventSemanticsConfig} config - The config parameter is an object that contains the
   * configuration settings for the event semantics. It may include properties such as the event type,
   * event source, event target, event data, and any other relevant information for setting up the
   * semantics of the event.
   * @vegaVersion 2.0.0
   */
  setSemantics(config) {
    EventManager.setSemantics(config);
  }
  /**
   * The function "getSemantics" returns the event semantics of an HTML element.
   *
   * @param {HTMLElement} host - The host parameter is an HTMLElement, which represents an HTML element
   * in the DOM (Document Object Model). It can be any valid HTML element such as a div, span, button,
   * etc.
   * @returns {EventSemantics} an object of type EventSemantics.
   * @vegaVersion 2.0.0
   */
  getSemantics(host) {
    return EventManager.getSemantics(host);
  }
  /**
   * The function "getEnabledEventIdsByComponent" returns the all eventIds in component.
   *
   * @param {VegaComponentName} componentName - The component name,
   * etc.
   * @returns {Nullable<VegaEventID[]>} All eventIds.
   * @vegaVersion 2.0.0
   */
  getEnabledEventIdsByComponent(componentName) {
    return EventManager.getEnabledEventIdsByComponent(componentName);
  }
}
__decorate([
  InjectVegaTelemetrySlimmer()
], VegaEventManager.prototype, "vegaPublicAPIRuntimeMetricsSlimmer", void 0);
export default new VegaEventManager();
