"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ModifierKey = void 0;
exports.isKeyPress = isKeyPress;
exports.isCrossPlatformKeyPress = isCrossPlatformKeyPress;
function isKeyPress(value) {
    return (value &&
        typeof value === 'object' &&
        typeof value.key === 'string' &&
        (!('altKey' in value) || typeof value.altKey === 'boolean') &&
        (!('ctrlKey' in value) || typeof value.ctrlKey === 'boolean') &&
        (!('metaKey' in value) || typeof value.metaKey === 'boolean') &&
        (!('shiftKey' in value) || typeof value.shiftKey === 'boolean'));
}
function isCrossPlatformKeyPress(value) {
    if (value.mac !== undefined && !isKeyPress(value.mac)) {
        return false;
    }
    if (value.windows !== undefined && !isKeyPress(value.windows)) {
        return false;
    }
    return isKeyPress(value);
}
var ModifierKey;
(function (ModifierKey) {
    ModifierKey["ALT_KEY"] = "altKey";
    ModifierKey["CTRL_KEY"] = "ctrlKey";
    ModifierKey["META_KEY"] = "metaKey";
    ModifierKey["SHIFT_KEY"] = "shiftKey";
})(ModifierKey || (exports.ModifierKey = ModifierKey = {}));
