"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const vscode = require("vscode");
const command_1 = require("../constants/command");
const ParserManager_1 = require("../model/ParserManager");
const setConfigMenuCommand = (ctx) => {
    ctx.subscriptions.push(vscode.commands.registerCommand(command_1.Commands.ConfigMenu, (commandParams) => {
        // 获取当前的
        const { path } = commandParams;
        const parser = ParserManager_1.default.getSingleInstance().caches[path];
        const configMenuCommand = parser.getService('configMenuCommand');
        vscode.window.showQuickPick(configMenuCommand.menus).then((item) => {
            if (item) {
                configMenuCommand.triggerCommand(item.key, {});
            }
        });
    }));
};
exports.default = setConfigMenuCommand;
//# sourceMappingURL=ConfigMenu.js.map