"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.AnnotationUpdateEvent = exports.AnnotationUpdateEmitter = void 0;
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
var _events = _interopRequireDefault(require("events"));
var AnnotationUpdateEvent = exports.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
var AnnotationUpdateEmitter = exports.AnnotationUpdateEmitter = /*#__PURE__*/function () {
  function AnnotationUpdateEmitter() {
    (0, _classCallCheck2.default)(this, AnnotationUpdateEmitter);
    (0, _defineProperty2.default)(this, "emitter", new _events.default());
  }
  return (0, _createClass2.default)(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:
    // Ignored via go/ees005
    // eslint-disable-next-line @typescript-eslint/no-explicit-any
    function on(event, listener) {
      return this.emitter.on(event, listener);
    }
  }, {
    key: "off",
    value:
    // Ignored via go/ees005
    // eslint-disable-next-line @typescript-eslint/no-explicit-any
    function off(event, listener) {
      return this.emitter.removeListener(event, listener);
    }
  }, {
    key: "listeners",
    value: function listeners(event) {
      return this.emitter.listeners(event);
    }
  }]);
}();