import React from 'react'
import { BrowserRouter as Router, Routes, Route } from 'react-router-dom'
import Login from './pages/Login'
import Register from './pages/Register'
import Dashboard from './pages/Dashboard'
import Pagelayout from './layout/Pagelayout'
import Product from './pages/Product'
import Warehouse from './pages/Warehouse'
import Transactions from './pages/Transactions'
import Reports from './pages/Reports'

const App = () => {
  return (
    <Router>
      <Routes>
        <Route element={<Pagelayout />}>
          <Route path='/dashboard' element={<Dashboard />} />
          <Route path='/product' element={<Product />} />
          <Route path='/warehouse' element={<Warehouse />} />
          <Route path='/transaction' element={<Transactions />} />
          <Route path='/reports' element={<Reports />} />
        </Route>
        <Route path='/' element={<Login />} />
        <Route path='/register' element={<Register />} />
      </Routes>
    </Router>
  )
}

export default App