import React from 'react';
import { observer } from 'mobx-react-lite';
import { SettingsPagePlain } from './SettingsPagePlain';
import { PageErrorState } from '../PageErrorState';
import { useWixPatternsContainer } from '@wix/bex-core/react';
function _SettingsPageWrapper({ state, ...rest }) {
    const { translate: t } = useWixPatternsContainer();
    if (state.initTask.status.isError) {
        return (React.createElement(PageErrorState, { title: t('cairo.page.loadError.failedState.title'), subtitle: t('cairo.page.loadError.failedState.description'), retryText: t('cairo.page.loadError.failedState.CTA'), onRetry: () => state.retryFetch(), ...rest }));
    }
    return React.createElement(SettingsPagePlain, { state: state, ...rest });
}
export const SettingsPageWrapper = observer(_SettingsPageWrapper);
//# sourceMappingURL=SettingsPageWrapper.js.map