import { Router, Route, Set } from '@redwoodjs/router'

import { useAuth } from './auth'
import AccountbarLayout from './layouts/AccountbarLayout/AccountbarLayout'
import NavbarLayout from './layouts/NavbarLayout/NavbarLayout'

const Routes = () => {
  return (
    <Router useAuth={useAuth}>
      <Set wrap={AccountbarLayout} title="Login">
        <Route path="/login" page={LoginPage} name="login" />
      </Set>

      <Set wrap={AccountbarLayout} title="Forgot Password">
        <Route path="/forgot-password" page={ForgotPasswordPage} name="forgotPassword" />
      </Set>

      <Set wrap={AccountbarLayout} title="Reset Password">
        <Route path="/reset-password" page={ResetPasswordPage} name="resetPassword" />
      </Set>

      <Set wrap={NavbarLayout}>
        <Route path="/" page={HomePage} name="home" />
      </Set>

      <Route notfound page={NotFoundPage} />
    </Router>
  )
}

export default Routes
