import express from 'express';
import {
  getRemarks,
  createRemark,
  getMeetings,
  createMeeting,
  getFollowUps,
  getAllFollowUps,
  getMyFollowUps,
  createFollowUp,
  updateFollowUp
} from '../controllers/activityController.js';
import { authenticateToken, isAdmin } from '../middleware/auth.js';

const router = express.Router();

router.get('/remarks/:customerId', authenticateToken, getRemarks);
router.post('/remarks/:customerId', authenticateToken, createRemark);

router.get('/meetings/:customerId', authenticateToken, getMeetings);
router.post('/meetings/:customerId', authenticateToken, createMeeting);

router.get('/follow-ups', authenticateToken, isAdmin, getAllFollowUps);
router.get('/follow-ups/:customerId', authenticateToken, getFollowUps);
router.get('/my-follow-ups', authenticateToken, getMyFollowUps);
router.post('/follow-ups/:customerId', authenticateToken, createFollowUp);
router.put('/follow-ups/:id', authenticateToken, updateFollowUp);

export default router;
