"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.OverlayPlugin = void 0;
var _utils = require("@grozav/utils");
var _controllers = require("@inkline/inkline/controllers");
const OverlayPlugin = {
  install: () => {
    if (typeof window !== "undefined") {
      window.addEventListener("keydown", e => {
        if ((0, _utils.isKey)("esc", e)) {
          _controllers.OverlayController.onPressEscape();
        }
      });
    }
  }
};
exports.OverlayPlugin = OverlayPlugin;