"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.BumpToolSetting = exports.FocusToolSettings = void 0;
/*---------------------------------------------------------------------------------------------
 * 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
 */
const core_frontend_1 = require("@itwin/core-frontend");
const UiFramework_1 = require("../UiFramework");
/**
 * Immediate tool that will focus into the Tool Settings widget.
 * @alpha
 */
class FocusToolSettings extends core_frontend_1.Tool {
    async run() {
        return UiFramework_1.UiFramework.toolSettings.focusIntoToolSettings();
    }
}
exports.FocusToolSettings = FocusToolSettings;
FocusToolSettings.toolId = "FocusToolSettings";
/**
 * Immediate tool that will bump a Tool Settings value.
 * @alpha
 */
class BumpToolSetting extends core_frontend_1.Tool {
    static get maxArgs() {
        return 1;
    }
    async run(settingIndexStr) {
        let settingIndex;
        if (settingIndexStr) {
            settingIndex = parseInt(settingIndexStr, 10);
            if (isNaN(settingIndex))
                return false;
        }
        core_frontend_1.IModelApp.toolAdmin.bumpToolSetting(settingIndex); // eslint-disable-line @typescript-eslint/no-floating-promises
        return true;
    }
    async parseAndRun(...args) {
        return this.run(args[0]);
    }
}
exports.BumpToolSetting = BumpToolSetting;
BumpToolSetting.toolId = "BumpToolSetting";
//# sourceMappingURL=ToolSettingsTools.js.map