import express from "express";
import {
  copyMyAssignmentPage,
  createMyAssignmentPage,
  deleteMyAssignmentPage,
  getMyAssignmentDocumentPages,
  getMyAssignmentForm,
  getMyProfile,
  listMyAssignments,
  listMyLocationDocuments,
  reorderMyAssignmentPages,
  saveMyAssignmentForm,
  startMyAssignmentWork,
} from "../controllers/swiAssignmentController.js";

const router = express.Router();

router.get("/me/profile", getMyProfile);
router.get("/me/location/documents", listMyLocationDocuments);
router.get("/me/assignments", listMyAssignments);
router.get(
  "/me/assignments/:document_id/:document_number/pages",
  getMyAssignmentDocumentPages
);
router.post(
  "/me/assignments/:document_id/:document_number/pages",
  createMyAssignmentPage
);
router.delete(
  "/me/assignments/:document_id/:document_number/pages/:page_id",
  deleteMyAssignmentPage
);
router.post(
  "/me/assignments/:document_id/:document_number/pages/copy",
  copyMyAssignmentPage
);
router.put(
  "/me/assignments/:document_id/:document_number/pages/order",
  reorderMyAssignmentPages
);
router.get(
  "/me/assignments/:document_id/:document_number/form",
  getMyAssignmentForm
);
router.put(
  "/me/assignments/:document_id/:document_number/form",
  saveMyAssignmentForm
);
router.post(
  "/me/assignments/:document_id/:document_number/start",
  startMyAssignmentWork
);

export default router;
