"use strict";
/*---------------------------------------------------------------------------------------------
 * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
 * See LICENSE.md in the project root for license terms and full copyright notice.
 *--------------------------------------------------------------------------------------------*/
/** @packageDocumentation
 * @module KeyboardShortcut
 */
Object.defineProperty(exports, "__esModule", { value: true });
exports.KeyboardShortcutUtilities = void 0;
const core_frontend_1 = require("@itwin/core-frontend");
/** Helper class to create keyboard shortcuts.
 * @beta
 */
var KeyboardShortcutUtilities;
(function (KeyboardShortcutUtilities) {
    /** Creates an shortcut from the specified tool type. */
    function createForTool(key, toolType, overrides) {
        return {
            key,
            icon: toolType.iconSpec,
            label: () => toolType.flyover,
            description: () => toolType.description,
            execute: () => {
                void core_frontend_1.IModelApp.tools.run(toolType.toolId);
            },
            ...overrides,
        };
    }
    KeyboardShortcutUtilities.createForTool = createForTool;
})(KeyboardShortcutUtilities || (exports.KeyboardShortcutUtilities = KeyboardShortcutUtilities = {}));
//# sourceMappingURL=KeyboardShortcutUtilities.js.map