/*---------------------------------------------------------------------------------------------
 * 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 * as React from "react";
import { Tool } from "@itwin/core-frontend";
import { ToolUtilities } from "@itwin/imodel-components-react";
import { SvgSettings } from "@itwin/itwinui-icons-react";
import { SettingsModalFrontstage } from "../frontstage/ModalSettingsStage.js";
class OpenSettingsCoreTool extends Tool {
    static get minArgs() {
        return 0;
    }
    static get maxArgs() {
        return 1;
    }
    async run(settingCategory) {
        SettingsModalFrontstage.showSettingsStage(settingCategory);
        return true;
    }
    async parseAndRun(...args) {
        return this.run(args[0]);
    }
}
OpenSettingsCoreTool.toolId = "OpenSettings";
OpenSettingsCoreTool.iconSpec = "icon-settings";
/**
 * Immediate tool that will open the Settings modal stage.
 * @alpha
 */
export const OpenSettingsTool = ToolUtilities.defineIcon(OpenSettingsCoreTool, React.createElement(SvgSettings, null));
//# sourceMappingURL=OpenSettingsTool.js.map