const express = require('express');
const router = express.Router();
const hajjController = require('../controllers/hajjController');
const { protect, adminOnly } = require('../middleware/authMiddleware');

// Public Routes
router.get('/tours', hajjController.getAllHajjTours);
router.get('/tours/featured', hajjController.getFeaturedHajjTours);
router.get('/tours/upcoming', hajjController.getUpcomingHajjTours);
router.get('/tours/slug/:slug', hajjController.getHajjTourBySlug);

// Admin Routes (Protected)
router.post('/tours', protect, adminOnly, hajjController.createHajjTour);
router.put('/tours/:id', protect, adminOnly, hajjController.updateHajjTour);
router.delete('/tours/:id', protect, adminOnly, hajjController.deleteHajjTour);
router.get('/tours/:id', protect, hajjController.getHajjTourById);

module.exports = router;
