/*---------------------------------------------------------------------------------------------
 * 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
 */
import { IModelApp } from "@itwin/core-frontend";
/** Helper class to create keyboard shortcuts.
 * @beta
 */
export 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 IModelApp.tools.run(toolType.toolId);
            },
            ...overrides,
        };
    }
    KeyboardShortcutUtilities.createForTool = createForTool;
})(KeyboardShortcutUtilities || (KeyboardShortcutUtilities = {}));
//# sourceMappingURL=KeyboardShortcutUtilities.js.map