// const express = require("express");
// const router = express.Router();
// // const authenticate = require("../../middlewares/authenticate");
// // const authorize = require("../../middlewares/authorize");

// const getSecurityDashboardStats= require("../../controllers/securityops/dashboardController");

// //  Security Dashboard (Stats + Recent Activity)
// router.get(
//   "/dashboard",
// //   authenticate,
// //   authorize("security", "admin", "superadmin", "qc"),
//   (req, res) =>{
//     getSecurityDashboardStats.getSecurityDashboardStats(req, res);
//   }
// );

// module.exports = router;



const express = require("express");
const router = express.Router();
const authenticate = require("../../middlewares/authenticate");
// const authorize = require("../../middlewares/authorize");
const getSecurityDashboardStats = require("../../controllers/securityops/dashboardController");

/**
 * @swagger
 * tags:
 *   name: Security Dashboard
 *   description: Security operations dashboard stats and recent activities
 */


//  Security Dashboard (Stats + Recent Activity)
// router.get(
//   "/dashboard",
//   authenticate,
//   // authorize("security", "admin", "superadmin", "qc"),
//   (req, res) => {

//     /*
//       #swagger.tags = ['Security Dashboard']
//       #swagger.summary = 'Get security dashboard stats and recent gate activities'

//       #swagger.responses[200] = {
//         description: 'Dashboard data fetched successfully',
//         content: {
//           "application/json": {
//             schema: {
//               type: "object",
//               properties: {
//                 success: { type: "boolean", example: true },
//                 data: {
//                   type: "object",
//                   properties: {
//                     stats: {
//                       type: "object",
//                       properties: {
//                         visitorsInside: { type: "number", example: 5 },
//                         totalVehicles: { type: "number", example: 12 },
//                         pendingApprovals: { type: "number", example: 2 },
//                         parkingOccupied: { type: "number", example: 8 }
//                       }
//                     },
//                     recentActivities: {
//                       type: "array",
//                       items: {
//                         type: "object",
//                         properties: {
//                           time: { type: "string", example: "2026-03-12T10:30:00Z" },
//                           type: { type: "string", example: "IN" },
//                           message: { type: "string", example: "Visitor Amit arrived at gate" }
//                         }
//                       }
//                     }
//                   }
//                 }
//               }
//             }
//           }
//         }
//       }
//     */

//     getSecurityDashboardStats.getSecurityDashboardStats(req, res);
//   }
// );

// router.get("/qc/dashboard", 
//   authenticate,
//   // authenticate, authorize(["admin", "qc", "security"]), 
//   (req, res) =>{
//     getSecurityDashboardStats.getQcDashboardStats(req, res);
//   }
  
// );

module.exports = router;