/* -------------------------------------------------------------------------------------------- * Copyright (c) Jan Dolejsi 2019. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. * ------------------------------------------------------------------------------------------ */ 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); exports.Menu = void 0; const vscode_1 = require("vscode"); class Menu { constructor(items, options) { this.items = items; this.options = options; } async show(token) { var _a; const selectedItem = await vscode_1.window.showQuickPick(this.items, this.options, token); if (selectedItem !== undefined) { await vscode_1.commands.executeCommand(selectedItem.command, ...((_a = selectedItem.args) !== null && _a !== void 0 ? _a : [])); } return selectedItem; } } exports.Menu = Menu; //# sourceMappingURL=Menu.js.map