import express from "express";
import { isAuthenticatedSalesCoOrdinator } from "../../middlewares/SalesCoOrdinatorAuth.js";
import { getNotification } from "./notificationController.js";
import { isAuthenticatedTerritoryManager } from "../../middlewares/TerritoryManagerAuth.js";
import { isAuthenticatedUser } from "../../middlewares/auth.js";
import { isAuthenticatedRD } from "../../middlewares/rdAuth.js";

const router = express.Router();

router
  .route("/get-notification-sc")
  .get(isAuthenticatedSalesCoOrdinator, getNotification);

router
  .route("/get-notification-sc/:id")
  .get(isAuthenticatedSalesCoOrdinator, getNotification);

router
  .route("/get-notification-tm")
  .get(isAuthenticatedTerritoryManager, getNotification);

router
  .route("/get-notification-tm/:id")
  .get(isAuthenticatedTerritoryManager, getNotification);

router.route("/get-notification-pd").get(isAuthenticatedUser, getNotification);
router.route("/get-notification-rd").get(isAuthenticatedRD, getNotification);

export default router;
