import { RouterProvider } from "react-router-dom";
import "./App.css";
import { AuthContextProvider } from "./core/context/auth_context";
import { MessageContextProvider } from "./core/context/message_context";
import { router } from "./core/router/router";
import { ToastContainer } from "react-toastify";

function App() {
  return (
    <div className="App">
      <AuthContextProvider>
        <MessageContextProvider>
          <RouterProvider router={router} />
        </MessageContextProvider>
      </AuthContextProvider>
      <ToastContainer
        position="bottom-right"
        autoClose={1000}
        hideProgressBar={true}
        closeOnClick
        rtl={false}
        pauseOnFocusLoss
      />
    </div>
  );
}

export default App;
