/*---------------------------------------------------------------------------------------------
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
* See LICENSE.md in the project root for license terms and full copyright notice.
*--------------------------------------------------------------------------------------------*/
/** @packageDocumentation
 * @module Tools
 */
import { IModelApp, Tool } from "@itwin/core-frontend";
import { UiFramework } from "../UiFramework";
/**
 * Immediate tool that will focus into the Tool Settings widget.
 * @alpha
 */
export class FocusToolSettings extends Tool {
    async run() {
        return UiFramework.toolSettings.focusIntoToolSettings();
    }
}
FocusToolSettings.toolId = "FocusToolSettings";
/**
 * Immediate tool that will bump a Tool Settings value.
 * @alpha
 */
export class BumpToolSetting extends Tool {
    // istanbul ignore next
    static get maxArgs() { return 1; }
    async run(settingIndexStr) {
        let settingIndex;
        if (settingIndexStr) {
            settingIndex = parseInt(settingIndexStr, 10);
            if (isNaN(settingIndex))
                return false;
        }
        IModelApp.toolAdmin.bumpToolSetting(settingIndex); // eslint-disable-line @typescript-eslint/no-floating-promises
        return true;
    }
    async parseAndRun(...args) {
        return this.run(args[0]);
    }
}
BumpToolSetting.toolId = "BumpToolSetting";
//# sourceMappingURL=ToolSettingsTools.js.map