import React, { useState } from 'react';
import { WidgetsFormContextProvider } from '@wix/bex-core/react';
import { PageWrapperBase } from '../PageWrapper';
import { WidgetsFormState } from '@wix/bex-core';
export function WidgetsFormProvider({ children, state, }) {
    const [widgetsFormState] = useState(() => state ?? new WidgetsFormState());
    return (React.createElement(WidgetsFormContextProvider, { value: widgetsFormState },
        React.createElement(PageWrapperBase, null, children)));
}
//# sourceMappingURL=WidgetsFormProvider.js.map