"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.withLogAction = withLogAction;
const core_1 = require("../core/index.js");
const logger_1 = require("../logger.js");
function withLogAction(action, command) {
    return (...args) => {
        const res = command(...args);
        if (res) {
            const [state] = args;
            const logger = (0, core_1.getLoggerFromState)(state);
            logger.action({ action, source: 'keymap' });
            logger_1.globalLogger.action({ action, source: 'keymap', mode: 'wysiwyg' });
        }
        return res;
    };
}
//# sourceMappingURL=keymap.js.map
