import { Router } from 'express';
import authRoutes from './auth.routes.js';
import userRoutes from './user.routes.js';
import vendorRoutes from './vendor.routes.js';
import courseRoutes from './course.routes.js';
import questionRoutes from './question.routes.js';
import attemptRoutes from './attempt.routes.js';
import paymentRoutes from './payment.routes.js';
import aiRoutes from './ai.routes.js';

const router = Router();

router.get('/health', (_req, res) => res.json({ success: true, service: 'CertsNexus API', status: 'ok' }));

router.use('/auth', authRoutes);
router.use('/users', userRoutes);
router.use('/vendors', vendorRoutes);
router.use('/courses', courseRoutes);
router.use('/questions', questionRoutes);
router.use('/attempts', attemptRoutes);
router.use('/payments', paymentRoutes);
router.use('/ai', aiRoutes);

export default router;
