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