import { jsx as _jsx } from "react/jsx-runtime";
import * as React from 'react';
import { BlocksContext } from "../../context/blocksContext/index.js";
import { PCEditorStoreProvider } from "../../context/editorStoreContext/index.js";
export const PageConstructorProvider = (props) => {
    const { children, blocks = [] } = props;
    /* eslint-disable react/jsx-key */
    const context = [
        _jsx(BlocksContext.Provider, { value: { blocks } }),
        _jsx(PCEditorStoreProvider, {}),
    ].reduceRight((prev, provider) => React.cloneElement(provider, {}, prev), children);
    /* eslint-enable react/jsx-key */
    return _jsx(React.Fragment, { children: context });
};
//# sourceMappingURL=Provider.js.map
