"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.handleUserInput = void 0;
const store_1 = require("../state/store");
const user_input_1 = require("../state/actions/user-input");
exports.handleUserInput = (input, key) => {
    if (key.escape) {
        store_1.store.dispatch(user_input_1.pressEscape());
        return;
    }
    if (key.upArrow) {
        store_1.store.dispatch(user_input_1.pressArrowUp());
        return;
    }
    if (key.downArrow) {
        store_1.store.dispatch(user_input_1.pressArrowDown());
        return;
    }
    if (key.ctrl && input === 'c') {
        store_1.store.dispatch(user_input_1.pressQ());
        return;
    }
    switch (input) {
        case 'q':
            store_1.store.dispatch(user_input_1.pressQ());
            return;
        case 'l':
        case 's':
        case 'r':
        case 'b':
        case 'e':
        case 'd':
        case 't':
        case 'p':
        case '$':
        default:
            return;
    }
};
//# sourceMappingURL=handle.js.map