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_STATE"] = "SET_ANNOTATION_STATE";
  AnnotationUpdateEvent["REMOVE_ANNOTATION_FOCUS"] = "REMOVE_ANNOTATION_FOCUS";
  AnnotationUpdateEvent["ON_ANNOTATION_CLICK"] = "ON_ANNOTATION_CLICK";
  AnnotationUpdateEvent["DESELECT_ANNOTATIONS"] = "DESELECT_ANNOTATIONS";
  return AnnotationUpdateEvent;
}({});
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);
  }
  on(event, listener) {
    return this.emitter.on(event, listener);
  }
  off(event, listener) {
    return this.emitter.removeListener(event, listener);
  }
  listeners(event) {
    return this.emitter.listeners(event);
  }
}