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

import PublicRoutes from './roles/guest/PublicRoutes';
import UserRoutes from './roles/user/UserRoutes';
import AdminRoutes from './roles/admin/AdminRoutes';
import TeacherRoutes from './roles/teacher/TeacherRoutes';

const App = () => {
  return (
    <Router>
        <Routes>
          <Route path="/*" element={<PublicRoutes />} />

          <Route path="/learning/*" element={<UserRoutes />} />
          <Route path="/portal/*" element={<TeacherRoutes />} />
          <Route path="/admin/*" element={<AdminRoutes />} />
        </Routes>
    </Router>
  );
};

export default App;
