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

/**
 * @swagger
 * tags:
 *   name: Dashboard
 *   description: HMS Dashboard statistics APIs
 */


router.get("/doctor-stats",authenticate, authorize(["admin", "superadmin","manager", "doctor"]), (req, res) => {
    /*
      #swagger.tags = ['Dashboard']
      #swagger.summary = 'Get doctor statistics for dashboard'
      #swagger.security = [{ "bearerAuth": [] }]
    */
    dashboardController.getDoctorStats(req, res);
}
);

router.get("/today-appointment-stats", authenticate, authorize(["admin", "superadmin","manager", "doctor"]), (req, res) => {
  /*
    #swagger.tags = ['Dashboard']
    #swagger.summary = 'Get today\'s appointment statistics for dashboard'
    #swagger.security = [{ "bearerAuth": [] }]
  */
  dashboardController.getTodayAppointmentStats(req, res);
});

router.get("/patient-stats-today", authenticate, authorize(["admin", "superadmin","manager", "doctor"]), (req, res) => {
  /*
    #swagger.tags = ['Dashboard']
    #swagger.summary = 'Get today\'s patient statistics for dashboard'
    #swagger.security = [{ "bearerAuth": [] }]
  */
  dashboardController.getPatientStatsToday(req, res);
});



module.exports = router;
