"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 Hooks
 */
Object.defineProperty(exports, "__esModule", { value: true });
exports.useActiveToolId = void 0;
const React = require("react");
const UiFramework_1 = require("../UiFramework");
/** @internal */
function useActiveToolId() {
    const [toolId, setToolId] = React.useState(UiFramework_1.UiFramework.frontstages.activeToolId);
    React.useEffect(() => {
        return UiFramework_1.UiFramework.frontstages.onToolActivatedEvent.addListener((args) => {
            setToolId(args.toolId);
        });
    }, []);
    return toolId;
}
exports.useActiveToolId = useActiveToolId;
//# sourceMappingURL=useActiveToolId.js.map