import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
import _createClass from "@babel/runtime/helpers/createClass";
import _defineProperty from "@babel/runtime/helpers/defineProperty";
import EventEmitter from 'events';
export var 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 var AnnotationUpdateEmitter = /*#__PURE__*/function () {
  function AnnotationUpdateEmitter() {
    _classCallCheck(this, AnnotationUpdateEmitter);
    _defineProperty(this, "emitter", new EventEmitter());
  }
  _createClass(AnnotationUpdateEmitter, [{
    key: "emit",
    value: function emit(event, params) {
      if (typeof params === 'undefined') {
        return this.emitter.emit(event);
      }
      return this.emitter.emit(event, params);
    }
  }, {
    key: "on",
    value: function on(event, listener) {
      return this.emitter.on(event, listener);
    }
  }, {
    key: "off",
    value: function off(event, listener) {
      return this.emitter.removeListener(event, listener);
    }
  }, {
    key: "listeners",
    value: function listeners(event) {
      return this.emitter.listeners(event);
    }
  }]);
  return AnnotationUpdateEmitter;
}();