// const express = require("express");
// const router = express.Router();
// const specializationController = require("../controllers/admin/specializationController");

// /**
//  * @swagger
//  * tags:
//  *   name: Public Specializations
//  *   description: Public (No Auth) Specialization APIs
//  */

// // CREATE specialization (No auth)
// router.post("/create", (req, res) => {
//   /*
//     #swagger.tags = ['Public Specializations']
//     #swagger.summary = 'Create specialization (Public)'
//     #swagger.description = 'Create specialization without authentication'
//     #swagger.parameters['body'] = {
//       in: 'body',
//       required: true,
//       schema: { name: "Cardiology", orgId: "64f5a2d8c9e4b3a1f0a12345" }
//     }
//   */
//   specializationController.createSpecialization(req, res);
// });

// // GET all
// router.get("/get/all", (req, res) => {
//   /*
//     #swagger.tags = ['Public Specializations']
//     #swagger.summary = 'Get all specializations (Public)'
//   */
//   specializationController.getSpecializations(req, res);
// });

// // GET by ID
// router.get("/get/:id", (req, res) => {
//   /*
//     #swagger.tags = ['Public Specializations']
//     #swagger.summary = 'Get specialization by ID (Public)'
//   */
//   specializationController.getSpecializationById(req, res);
// });

// // UPDATE
// router.put("/update/:id", (req, res) => {
//   /*
//     #swagger.tags = ['Public Specializations']
//     #swagger.summary = 'Update specialization (Public)'
//   */
//   specializationController.updateSpecialization(req, res);
// });

// // DELETE
// router.delete("/delete/:id", (req, res) => {
//   /*
//     #swagger.tags = ['Public Specializations']
//     #swagger.summary = 'Delete specialization (Public)'
//   */
//   specializationController.deleteSpecialization(req, res);
// });

// module.exports = router;


const express = require("express");
const router = express.Router();
const specializationController = require("../controllers/admin/specializationController");

/**
 * @swagger
 * tags:
 *   name: Public Specializations
 *   description: Public (No Auth) Specialization APIs
 */

/**
 * ------------------------------------------------
 * CREATE specialization (Public)
 * ------------------------------------------------
 */
router.post("/create", (req, res) => {
  /*
    #swagger.tags = ['Public Specializations']
    #swagger.summary = 'Create specialization (Public)'
    #swagger.parameters['body'] = {
      in: 'body',
      required: true,
      schema: { 
        name: "Cardiology", 
        orgId: "64f5a2d8c9e4b3a1f0a12345" 
      }
    }
  */
  specializationController.createSpecialization(req, res);
});


/**
 * ------------------------------------------------
 * GET all specializations (Public)
 * ------------------------------------------------
 * Requires orgId as query param
 */
router.get("/get/all", (req, res) => {
  /*
    #swagger.tags = ['Public Specializations']
    #swagger.summary = 'Get all specializations by organization'
    #swagger.parameters['orgId'] = {
      in: 'query',
      required: true,
      type: 'string',
      description: 'Organization ID'
    }
  */
  specializationController.getSpecializations(req, res);
});


/**
 * ------------------------------------------------
 * GET specialization by ID (Public)
 * ------------------------------------------------
 * Requires orgId as query param
 */
router.get("/get/:id", (req, res) => {
  /*
    #swagger.tags = ['Public Specializations']
    #swagger.summary = 'Get specialization by ID (Public)'
    #swagger.parameters['orgId'] = {
      in: 'query',
      required: true,
      type: 'string'
    }
  */
  specializationController.getSpecializationById(req, res);
});


/**
 * ------------------------------------------------
 * UPDATE specialization (Public)
 * ------------------------------------------------
 */
router.put("/update/:id", (req, res) => {
  /*
    #swagger.tags = ['Public Specializations']
    #swagger.summary = 'Update specialization (Public)'
    #swagger.parameters['body'] = {
      in: 'body',
      required: true,
      schema: { 
        name: "Neurology",
        orgId: "64f5a2d8c9e4b3a1f0a12345"
      }
    }
  */
  specializationController.updateSpecialization(req, res);
});


/**
 * ------------------------------------------------
 * DELETE specialization (Public)
 * ------------------------------------------------
 */
router.delete("/delete/:id", (req, res) => {
  /*
    #swagger.tags = ['Public Specializations']
    #swagger.summary = 'Delete specialization (Public)'
    #swagger.parameters['orgId'] = {
      in: 'query',
      required: true,
      type: 'string'
    }
  */
  specializationController.deleteSpecialization(req, res);
});

module.exports = router;
