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 }) {
    return (_jsx("div", { className: b(null, [className]), 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') }), isLastGroup || _jsx("div", { className: b('group-separator') })] }, index));
        }) }));
}
//# sourceMappingURL=Toolbar.js.map
