import _defineProperty from "@babel/runtime/helpers/defineProperty";
import EventEmitter from 'events';
export let AnnotationUpdateEvent = /*#__PURE__*/function (AnnotationUpdateEvent) {
  AnnotationUpdateEvent["SET_ANNOTATION_FOCUS"] = "SET_ANNOTATION_FOCUS";
  AnnotationUpdateEvent["SET_ANNOTATION_HOVERED"] = "SET_ANNOTATION_HOVERED";
  AnnotationUpdateEvent["SET_ANNOTATION_STATE"] = "SET_ANNOTATION_STATE";
  AnnotationUpdateEvent["REMOVE_ANNOTATION_FOCUS"] = "REMOVE_ANNOTATION_FOCUS";
  AnnotationUpdateEvent["REMOVE_ANNOTATION_HOVERED"] = "REMOVE_ANNOTATION_HOVERED";
  AnnotationUpdateEvent["ON_ANNOTATION_CLICK"] = "ON_ANNOTATION_CLICK";
  AnnotationUpdateEvent["DESELECT_ANNOTATIONS"] = "DESELECT_ANNOTATIONS";
  return AnnotationUpdateEvent;
}({});
// eslint-disable-next-line @atlaskit/volt-strict-mode/no-multiple-exports
export class AnnotationUpdateEmitter {
  constructor() {
    _defineProperty(this, "emitter", new EventEmitter());
  }
  emit(event, params) {
    if (typeof params === 'undefined') {
      return this.emitter.emit(event);
    }
    return this.emitter.emit(event, params);
  }
  // Ignored via go/ees005
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
  on(event, listener) {
    return this.emitter.on(event, listener);
  }
  // Ignored via go/ees005
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
  off(event, listener) {
    return this.emitter.removeListener(event, listener);
  }
  listeners(event) {
    return this.emitter.listeners(event);
  }
}