"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports["default"] = void 0;
var overlayManager = {
  allOverlays: [],
  addOverlay: function addOverlay(overlay) {
    this.removeOverlay(overlay);
    this.allOverlays.unshift(overlay);
  },
  isCurrentOverlay: function isCurrentOverlay(overlay) {
    return overlay && this.allOverlays[0] === overlay;
  },
  removeOverlay: function removeOverlay(overlay) {
    var i = this.allOverlays.indexOf(overlay);

    if (i > -1) {
      this.allOverlays.splice(i, 1);
    }
  }
};
var _default = overlayManager;
exports["default"] = _default;