import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import { Fragment } from 'react';
import { cn } from "../classname.js";
import { ToolbarButtonGroup } from "./ToolbarGroup.js";
import "./Toolbar.css";
const b = cn('toolbar');
export function Toolbar({ editor, data, className, focus, onClick, display, qa, disableHotkey, disablePreview, disableTooltip, }) {
    return (_jsx("div", { className: b({ display }, [className]), "data-qa": qa, children: data.map((group, index) => {
            const isLastGroup = index === data.length - 1;
            return (_jsxs(Fragment, { children: [_jsx(ToolbarButtonGroup, { data: group, editor: editor, focus: focus, onClick: onClick, className: b('group'), disableHotkey: disableHotkey, disablePreview: disablePreview, disableTooltip: disableTooltip }), isLastGroup || _jsx("div", { className: b('group-separator') })] }, index));
        }) }));
}
//# sourceMappingURL=Toolbar.js.map
