import React from "react";
import { Route, Routes } from "react-router-dom";

import {
  LOGIN_PAGE,
  HOME_PAGE,
  FORGOT_PASSWORD_PAGE,
  NOT_FOUND_PAGE,
  ERROR_PAGE,
} from "./constants/pages";

// import LoginPage from './pages/LoginPage/LoginPage';
import LoginPage from "./pages/LoginPage/LoginPageMUI";
// import HomePage from './pages/HomePage/HomePage';
import HomePage from "./pages/HomePage/HomePageMUI";
import NotFoundPage from "./pages/ErrorPages/NotFoundPage";
import ErrorPage from "./pages/ErrorPages/ErrorPage";
// import ForgotPasswordPage from './pages/ForgotPasswordPage/ForgotPasswordPage';
import ForgotPasswordPage from "./pages/ForgotPasswordPage/ForgotPasswordPage";
import PrivateRoute from "./components/Router/PrivateRoute";

const AppRoutes = () => (
  <Routes>
    <Route path="*" element={<NotFoundPage />} />
    <Route path={LOGIN_PAGE} element={<LoginPage />} />
    <Route path={NOT_FOUND_PAGE} element={<NotFoundPage />} />
    <Route path={ERROR_PAGE} element={<ErrorPage />} />
    <Route path={FORGOT_PASSWORD_PAGE} element={<ForgotPasswordPage />} />
    <Route path={HOME_PAGE} element={<PrivateRoute />}>
      <Route path={HOME_PAGE} element={<HomePage />} />
    </Route>
  </Routes>
);

export default AppRoutes;
