"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.Toolbar = Toolbar;
const jsx_runtime_1 = require("react/jsx-runtime");
const react_1 = require("react");
const classname_1 = require("../classname.js");
const ToolbarGroup_1 = require("./ToolbarGroup.js");
require("./Toolbar.css");
const b = (0, classname_1.cn)('toolbar');
function Toolbar({ editor, data, className, focus, onClick, display, qa, disableHotkey, disablePreview, disableTooltip, }) {
    return ((0, jsx_runtime_1.jsx)("div", { className: b({ display }, [className]), "data-qa": qa, children: data.map((group, index) => {
            const isLastGroup = index === data.length - 1;
            return ((0, jsx_runtime_1.jsxs)(react_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(ToolbarGroup_1.ToolbarButtonGroup, { data: group, editor: editor, focus: focus, onClick: onClick, className: b('group'), disableHotkey: disableHotkey, disablePreview: disablePreview, disableTooltip: disableTooltip }), isLastGroup || (0, jsx_runtime_1.jsx)("div", { className: b('group-separator') })] }, index));
        }) }));
}
//# sourceMappingURL=Toolbar.js.map
