"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.enterKeyHandler = enterKeyHandler;
exports.escapeKeyHandler = escapeKeyHandler;
exports.combinedKeyHandler = combinedKeyHandler;
const shortcuts_1 = require("../shortcuts/index.js");
function enterKeyHandler(handler) {
    return (event) => {
        if (event.key === shortcuts_1.Key.Enter) {
            handler(event);
        }
    };
}
function escapeKeyHandler(handler) {
    return (event) => {
        if (event.key === shortcuts_1.Key.Esc) {
            handler(event);
        }
    };
}
function combinedKeyHandler(handlers) {
    return (event) => {
        const handler = handlers[event.key];
        if (handler) {
            handler(event);
        }
    };
}
//# sourceMappingURL=handlers.js.map
