import React from 'react'
import { Route, Routes } from 'react-router'
import Home from './pages/home/Home'
import Admin from './pages/admin/Admin'
import ProtectedAdmin from './pages/admin/auth/ProtectedAdmin'
import Auth from './pages/home/auth/Auth'
import UserManagement from './pages/admin/User/UserManagement'
import CategoryManagement from './pages/admin/Category/CategoryManagement'

export default function RouterSetup() {
  return <Routes>
    <Route path='/' element={<Home />}></Route>
    <Route path='/auth' element={<Auth />}></Route>
    <Route path='admin' element={
      <ProtectedAdmin>
        <Admin />
      </ProtectedAdmin>
    }>
      <Route path='user' element={<UserManagement />}></Route>
      <Route path='category' element={<CategoryManagement />}></Route>
    </Route>
  </Routes>
}
