"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 StatusBar
 */
Object.defineProperty(exports, "__esModule", { value: true });
exports.SelectionInfoField = void 0;
const React = require("react");
const SelectionCount_1 = require("./SelectionCount");
const useReduxFrameworkState_1 = require("../uistate/useReduxFrameworkState");
/** `SelectionInfoField` component is designed to be specified in a status bar.
 * It is used to display the number of items in a selection set.
 * @note Requires redux provider.
 * @public
 * @deprecated in 4.15.0. Use {@link SelectionCountField} instead.
 */
// eslint-disable-next-line deprecation/deprecation
function SelectionInfoField(props) {
    const numItemsSelected = (0, useReduxFrameworkState_1.useReduxFrameworkState)(
    // eslint-disable-next-line deprecation/deprecation
    (state) => state?.sessionState.numItemsSelected ?? 0);
    return (React.createElement(SelectionCount_1.SelectionCountField, { className: props.className, style: props.style, count: numItemsSelected }));
}
exports.SelectionInfoField = SelectionInfoField;
//# sourceMappingURL=SelectionInfo.js.map