import { observer } from 'mobx-react-lite';
import React, { useEffect, useLayoutEffect } from 'react';
import { Box } from '@wix/design-system';
function _GridFoldersSection(props) {
    const { dataHook, state, header, children } = props;
    const { toolbar: { contentPaddingPx }, } = state;
    useLayoutEffect(() => state._containerRectState._sync(), []);
    useEffect(() => state._containerRectState.init(), []);
    return (React.createElement("div", { "data-hook": dataHook },
        header,
        React.createElement(Box, { direction: "vertical", paddingTop: contentPaddingPx, paddingRight: contentPaddingPx, paddingLeft: contentPaddingPx },
            React.createElement("div", { ref: (el) => {
                    state._containerRectState.element = el;
                } }, children))));
}
export const GridFoldersSection = observer(_GridFoldersSection);
//# sourceMappingURL=GridFoldersSection.js.map