"use strict";

import React, { useMemo } from 'react';
import { Provider } from 'react-redux';
import { KeyboardProvider } from 'react-native-keyboard-controller';
import { store } from '../../roomStore';
import { XmppProvider } from '../../context/xmppProvider';
import { MessageNotificationProvider } from '../../context/MessageNotificationContext';
import { ToastProvider } from '../../context/ToastContext';
import LoginWrapper from './LoginWrapper';
import '../../helpers/storeConsole';
import { jsx as _jsx } from "react/jsx-runtime";
export const ReduxWrapper = /*#__PURE__*/React.memo(({
  ...props
}) => {
  const memoizedConfig = useMemo(() => {
    return props.config;
  }, [props.config]);
  return /*#__PURE__*/_jsx(Provider, {
    store: store,
    children: /*#__PURE__*/_jsx(KeyboardProvider, {
      children: /*#__PURE__*/_jsx(XmppProvider, {
        config: memoizedConfig,
        children: /*#__PURE__*/_jsx(ToastProvider, {
          children: /*#__PURE__*/_jsx(MessageNotificationProvider, {
            config: memoizedConfig,
            children: /*#__PURE__*/_jsx(LoginWrapper, {
              config: memoizedConfig,
              ...props
            })
          })
        })
      })
    })
  });
});
//# sourceMappingURL=ReduxWrapper.js.map