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

import MainNav from '../../components/layout/guest/MainNav';
import NotFound from './NotFound';
import Unauthorized from './auth/views/Unauthorized';

import HomePage from './landing_page/views/Home';
import LoginPage from './auth/views/Login';
import RegisterPage from './auth/views/Register';
import ForgotPage from './auth/views/ForgotPass';
import ValidateEmail from './auth/views/ValidateEmail';
import ResetPass from './auth/views/ResetPass';

function PublicRoutes() {
    return(
        <div>
            <MainNav />
            <Routes>
                <Route path="*" element={<NotFound/>} />
                <Route path="/unauthorized" element={<Unauthorized />} />
                
                <Route path="/" element={<HomePage />} />
                <Route path="login" element={<LoginPage />} />
                <Route path="signup" element={<RegisterPage />} />
                <Route path="forgot" element={<ForgotPage />} />
                <Route path="validate-email" element={<ValidateEmail />} />
                <Route path="resetPassword/:token" element={<ResetPass />} />
            </Routes>
        </div>
    )
}

export default PublicRoutes;