"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.AnnotationUpdateEmitter = void 0;
exports.createAnnotationManager = createAnnotationManager;
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
var _get2 = _interopRequireDefault(require("@babel/runtime/helpers/get"));
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
var _events = require("events");
var _manager = require("./manager");
function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); }
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
function _superPropGet(t, o, e, r) { var p = (0, _get2.default)((0, _getPrototypeOf2.default)(1 & r ? t.prototype : t), o, e); return 2 & r && "function" == typeof p ? function (t) { return p.apply(e, t); } : p; }
var AnnotationUpdateEmitter = exports.AnnotationUpdateEmitter = /*#__PURE__*/function (_EventEmitter) {
  function AnnotationUpdateEmitter() {
    (0, _classCallCheck2.default)(this, AnnotationUpdateEmitter);
    return _callSuper(this, AnnotationUpdateEmitter, arguments);
  }
  (0, _inherits2.default)(AnnotationUpdateEmitter, _EventEmitter);
  return (0, _createClass2.default)(AnnotationUpdateEmitter, [{
    key: "on",
    value: function on(event, listener) {
      return _superPropGet(AnnotationUpdateEmitter, "on", this, 3)([event, listener]);
    }
  }, {
    key: "off",
    value: function off(event, listener) {
      return _superPropGet(AnnotationUpdateEmitter, "removeListener", this, 3)([event, listener]);
    }
  }]);
}(_events.EventEmitter); // type ActionResult = { step: Step; doc: JSONDocNode } | false;
// | false;
// ### Events
// ### Hook Results
/**
 * This is the list of methods which exist on the Manager interface. These are the methods that can be hooked into.
 */
/*
 * This is the public interface for the AnnotationManager. It provides methods for interacting with the manager.
 */
/**
 * This is a factory method which creates a new instance of the AnnotationManager.
 *
 * @example
 * const annotationManager: AnnotationManager = createAnnotationManager();
 */
// eslint-disable-next-line @atlaskit/volt-strict-mode/no-multiple-exports
function createAnnotationManager() {
  return new _manager.SharedAnnotationManager();
}