import React from 'react';
import { Routes, Route, Navigate } from 'react-router-dom';
// import { ValidationProvider } from '../../utils/ValidationContext';

import TeacherLayout from '../../components/layout/teacher/TeacherLayout';
import NotFound from './NotFound';

import Dashboard from './dashboard/views/Dashboard';

import '../../assets/styles/user.css';

import ProtectedRoute from '../../utils/ProtectedRoute';
import ManageClasses from './manage_classes/views/ManageClasses';
import ClassDetail from './manage_classes/views/ClassDetail';
import ManageStudents from './manage_students/views/ManageStudents';
import Monitoring from './monitoring/views/Monitoring';
import StudentProgress from './monitoring/views/StudentProgress';
import ClassProgress from './monitoring/views/ClassProgress';
import Feedback from './feedback/views/Feedback';
import StudentFeedback from './feedback/views/StudentFeedback';
import ClassFeedback from './feedback/views/ClassFeedback';
import Setting from './setting/views/Setting';

import Review from '../user/review/views/Review';

import '../../assets/styles/teacher.css'

const TeacherRoutes = () => {
  return (
    <TeacherLayout>
      <Routes>
        <Route element={<ProtectedRoute role="teacher" />}>
          <Route path="*" element={<NotFound/>} />

          <Route path="/" element={<Navigate to="home" replace />} />
          <Route path="home" element={<Dashboard />} />
          <Route path="class" element={<ManageClasses />} />
          <Route path="class/d/:classId" element={<ClassDetail />} />
          <Route path="student" element={<ManageStudents />} />

          <Route path="monitoring" element={<Monitoring />} />
          <Route path="monitoring/s/:stdLearning" element={<Review />} />
          <Route path="monitoring/c/:classId" element={<ClassProgress />} />

          <Route path="feedback" element={<Feedback />} />
          <Route path="feedback/s/:progressId" element={<StudentFeedback />} />
          <Route path="feedback/c/:progressId" element={<ClassFeedback />} />
          <Route path="setting" element={<Setting />} />

        </Route>
      </Routes>
    </TeacherLayout>
  );
};

export default TeacherRoutes;
