"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.StatusBarOverflow = void 0;
const core_react_1 = require("@itwin/core-react");
const React = require("react");
const useTranslation_1 = require("../hooks/useTranslation");
const itwinui_react_1 = require("@itwin/itwinui-react");
const itwinui_icons_react_1 = require("@itwin/itwinui-icons-react");
const StatusBarPopover_1 = require("./popup/StatusBarPopover");
require("./Overflow.scss");
/** Entry point to overflow status bar items of [[StatusBarComposer]] component.
 * @internal
 */
function StatusBarOverflow(props) {
    const { overflowItems, onResize, ...otherProps } = props;
    const { translate } = (0, useTranslation_1.useTranslation)();
    const roRef = (0, core_react_1.useResizeObserver)(onResize);
    return (React.createElement(StatusBarPopover_1.StatusBarPopover, { content: React.createElement("div", { className: "uifw-statusbar-overflow-panel", "data-testid": "uifw-statusbar-overflow-panel" }, overflowItems) },
        React.createElement(itwinui_react_1.IconButton, { ...otherProps, ref: roRef, label: translate("statusBar.overflow"), styleType: "borderless" },
            React.createElement(itwinui_icons_react_1.SvgMore, null))));
}
exports.StatusBarOverflow = StatusBarOverflow;
//# sourceMappingURL=Overflow.js.map