'use client';

import LocalizationProvider from '@akinon/next/localization/provider';
import { SessionProvider } from 'next-auth/react';
import { Provider } from 'react-redux';
import { store } from 'redux/store';

export default function PzProviders({
  translations,
  children
}: {
  translations: any;
  children: React.ReactNode;
}) {
  return (
    <Provider store={store}>
      <SessionProvider refetchOnWindowFocus={false}>
        <LocalizationProvider translations={translations}>
          {children}
        </LocalizationProvider>
      </SessionProvider>
    </Provider>
  );
}
