/*---------------------------------------------------------------------------------------------
 * 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 { Direction, ToolbarPanelAlignment } from "@itwin/components-react";
import { Toolbar as ToolGroupToolbar } from "./new-toolbars/Toolbar.js";
/** Component that displays toolbar items.
 * @beta
 */
export function Toolbar(props) {
    const { expandsTo: expandsToProp, panelAlignment: panelAlignmentProp, ...rest } = props;
    const expandsTo = toDirection(expandsToProp);
    const panelAlignment = toPanelAlignment(panelAlignmentProp);
    return (React.createElement(ToolGroupToolbar, { expandsTo: expandsTo, panelAlignment: panelAlignment, ...rest }));
}
function toDirection(direction) {
    switch (direction) {
        case Direction.Bottom:
            return "bottom";
        case Direction.Left:
            return "left";
        case Direction.Right:
            return "right";
        case Direction.Top:
            return "top";
    }
    return undefined;
}
function toPanelAlignment(alignment) {
    switch (alignment) {
        case ToolbarPanelAlignment.End:
            return "end";
        case ToolbarPanelAlignment.Start:
            return "start";
    }
    return undefined;
}
//# sourceMappingURL=Toolbar.js.map