import { Router } from "express";
import {
  dashboardSummary,
  financeReport
} from "../controllers/report.controller.js";
import { authenticate, requireRole } from "../middleware/auth.middleware.js";
import { roles } from "../utils/constants.js";

const router = Router();

router.get(
  "/dashboard",
  authenticate,
  requireRole("super_admin", "ministry_finance", "ministry_justice", "owner", "teller", "payment", "executive"),
  dashboardSummary
);
router.get(
  "/finance",
  authenticate,
  requireRole(roles.SUPER_ADMIN, roles.MINISTRY_FINANCE),
  financeReport
);

export default router;
