import React, { useEffect } from 'react';
import { observer } from 'mobx-react-lite';
import { SettingsPageWrapper } from './SettingsPageWrapper';
import { SettingsPageContextProvider } from '../../providers';
import { FormProvider } from 'react-hook-form';
import { minimalRequiredWdsRuntimeCheck } from '../../minimalRequiredWdsRuntimeCheck';
import { FormPageProvider } from '../FormPage';
import { SettingsPageHeader } from '../SettingsPageHeader';
import { SettingsPageContent } from '../SettingsPageContent';
import { SettingsPageMainContent } from '../SettingsPageMainContent';
import { SettingsPageAdditionalContent } from '../SettingsPageAdditionalContent';
import { SettingsPageCard } from '../SettingsPageCard';
function _SettingsPage({ state, ...rest }) {
    if (process.env.NODE_ENV !== 'production') {
        minimalRequiredWdsRuntimeCheck({
            required: '^1.73.0',
            requiredBy: 'WixPatterns/SettingsPage',
        });
    }
    useEffect(() => state.init(), []);
    return (React.createElement(SettingsPageContextProvider, { value: state },
        React.createElement(FormPageProvider, { state: state.formPage },
            React.createElement(FormProvider, { ...state.form },
                React.createElement(SettingsPageWrapper, { state: state, ...rest })))));
}
_SettingsPage.Header = SettingsPageHeader;
_SettingsPage.Content = SettingsPageContent;
_SettingsPage.MainContent = SettingsPageMainContent;
_SettingsPage.AdditionalContent = SettingsPageAdditionalContent;
_SettingsPage.Card = SettingsPageCard;
_SettingsPage.displayName = 'SettingsPage';
export const SettingsPage = observer(_SettingsPage);
//# sourceMappingURL=SettingsPage.js.map