import express from 'express';
import { authenticate } from '../middleware/authMiddleware.js';
import { authorize } from '../middleware/authorizationMiddleware.js';
import {
  createClubVenue,
  deleteClubVenue,
  listClubVenues,
  updateClubVenue,
} from '../controllers/clubVenueController.js';

const router = express.Router();

router.get('/:clubId', authenticate, authorize('settings', 'read'), listClubVenues);
router.post('/:clubId', authenticate, authorize('settings', 'write'), createClubVenue);
router.put('/:clubId/:venueId', authenticate, authorize('settings', 'write'), updateClubVenue);
router.delete('/:clubId/:venueId', authenticate, authorize('settings', 'write'), deleteClubVenue);

export default router;
