import express from "express";
import { getMonitorings, getMonitoringById,monitoringStudentsProgress, monitoringStudentProgressById, getClassMonitoringByClassId, getClassMonitoringDataByClassAndTopic, getMonitoringByTopicId, monitoringFeedback, monitoringFeedbackByClassAndTopic, monitoringStudentProgressCSVById, classMonitoringCSVByClassAndTopic } from "../../controllers/monitoringControllers/monitoring.js";
import { verifyLoginUser, adminOrTeacherOnly } from "../../middlewares/User/authUser.js";

const router = express.Router();

router.get("/monitoring", verifyLoginUser, getMonitorings);

router.get("/monitoring/progress", verifyLoginUser, adminOrTeacherOnly, monitoringStudentsProgress);

router.get("/monitoring/class", verifyLoginUser, getClassMonitoringDataByClassAndTopic);

router.get("/monitoring/:id", verifyLoginUser, getMonitoringById);

router.get("/monitoring/class/csv", verifyLoginUser, adminOrTeacherOnly, classMonitoringCSVByClassAndTopic);

router.get("/monitoring/class/:classId", verifyLoginUser, adminOrTeacherOnly, getClassMonitoringByClassId);

router.get("/monitoring/topic/:topicId", verifyLoginUser, getMonitoringByTopicId);

router.get("/monitoring/progress/:id", verifyLoginUser, adminOrTeacherOnly, monitoringStudentProgressById);

router.get("/monitoring/progress/csv/:id", verifyLoginUser, adminOrTeacherOnly, monitoringStudentProgressCSVById);

router.post("/monitoring/feedback/class", verifyLoginUser, adminOrTeacherOnly, monitoringFeedbackByClassAndTopic);

router.post("/monitoring/feedback/:id", verifyLoginUser, adminOrTeacherOnly, monitoringFeedback);

export default router