const express = require("express");
const router = express.Router();

const hotelController = require("../controllers/hotelSearchController");
const hotelDetailsController = require("../controllers/hotelDetailsController");
const hotelRulesController = require("../controllers/newHotelRulesController");
//const hotelRateRuleController = require("../controllers/hotelRateRuleController")
const hotelCreateReservationController = require("../controllers/hotelBookingController");
const hotelRetrieveController = require("../controllers/URhotelRetrieveController");
const hotelCancelController = require("../controllers/hotelCancelController");
const universalRecordModifyController = require("../controllers/URhotelModifyController");
const hotelRateRulecontroller = require("../controllers/hotelRateRuleController");
const hotelAutoCompleteController = require("../controllers/hotelAutoCompleteController");
const newSearchController = require("../controllers/newSearchController");
const { hotelsDetails } = require("../controllers/newHotelDetailsController");


router.post("/search", hotelController.searchHotelAvailability);
// POST → Hotel Details
router.post("/details", hotelDetailsController.getHotelDetails);
router.post("/rules", hotelRulesController.getHotelRules);
//route.post("/rate/rule", hotelRateRuleController.hotelDetailsController)
router.post("/create/booking", hotelCreateReservationController.createHotelReservation);
router.post("/ur/retrieve", hotelRetrieveController.hotelRetrieve);
router.post("/cancel", hotelCancelController.hotelCancel);
router.post("/ur/modify",universalRecordModifyController.modifyUniversalRecordHotel);
router.post("/rate/rule", hotelRateRulecontroller.getHotelRateAndRule);
router.get("/autocomplete", hotelAutoCompleteController);
router.post("/new/search", newSearchController.hotelSearch);
router.post("/new/details", hotelsDetails);

module.exports = router;