import React from "react";
import {
  AppProvider,
  AuthProvider,
  AlertProvider,
  DialogProvider,
  NotificationsProvider,
} from "./hooks";
import "./Theme.less";
import esES from "antd/lib/locale/es_ES";
import moment from "moment";
import { AppRouting } from "./routers";
import { ConfigProvider } from "antd";
import { HelmetProvider } from "react-helmet-async";

moment.locale("es");

const App = () => (
  <ConfigProvider locale={esES}>
    <HelmetProvider>
      <AppProvider>
        <AlertProvider>
          <DialogProvider>
            <NotificationsProvider>
              <AuthProvider>
                <AppRouting />
              </AuthProvider>
            </NotificationsProvider>
          </DialogProvider>
        </AlertProvider>
      </AppProvider>
    </HelmetProvider>
  </ConfigProvider>
);

export default App;
