import { Box } from '@wix/design-system';
import React, { Children, useEffect } from 'react';
import { observer } from 'mobx-react-lite';
function _ToolbarGroupScrollWidthBox(props) {
    const { state, children, ...rest } = props;
    useEffect(() => {
        state._syncWidth();
    }, [state._shouldShrink]);
    if (!Children.toArray(children).length) {
        return null;
    }
    return (React.createElement(Box, { ref: (el) => {
            state._groupElement = el;
        }, direction: "horizontal", ...rest }, children));
}
export const ToolbarGroupScrollWidthBox = observer(_ToolbarGroupScrollWidthBox);
//# sourceMappingURL=ToolbarGroupScrollWidthBox.js.map