"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.DropdownEvents = void 0;
var _mitt = _interopRequireDefault(require("mitt"));
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
const EVENTS = {
  CLOSE: 'close'
};
const emitter = (0, _mitt.default)();
class DropdownEvents {
  closeAllDropdowns() {
    emitter.emit(EVENTS.CLOSE);
  }
  onCloseAllDropdowns(callback) {
    emitter.on(EVENTS.CLOSE, callback);
    return () => {
      emitter.off(EVENTS.CLOSE, callback);
    };
  }
}
const dropdownEvents = exports.DropdownEvents = new DropdownEvents();