/*---------------------------------------------------------------------------------------------
 * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
 * See LICENSE.md in the project root for license terms and full copyright notice.
 *--------------------------------------------------------------------------------------------*/
/** @packageDocumentation
 * @module Toolbar
 */
import * as React from "react";
import { InternalToolbarComponent as CR_Toolbar } from "@itwin/components-react";
import { toUIAToolbarItem } from "./toUIAToolbarItem";
import { SyncUiEventDispatcher } from "../syncui/SyncUiEventDispatcher";
/** Component that displays toolbar items.
 * @beta
 */
export function Toolbar(props) {
    const { items, ...other } = props;
    const uiaItems = React.useMemo(() => {
        return items.map((item) => toUIAToolbarItem(item));
    }, [items]);
    return (React.createElement(CR_Toolbar // eslint-disable-line deprecation/deprecation
    , { items: uiaItems, syncUiEvent: SyncUiEventDispatcher.onSyncUiEvent, ...other }));
}
//# sourceMappingURL=Toolbar.js.map