import { Router, type IRouter } from 'express';
import { authenticate } from '../middlewares/auth.middleware.js';
import { tenantMiddleware } from '../middlewares/tenant.middleware.js';
import * as calendarioController from '../controllers/calendario.controller.js';

const router: IRouter = Router();

router.use(authenticate);
router.use(tenantMiddleware);

// GET /api/calendario/generados — eventos fiscales + recordatorios custom
router.get('/generados', calendarioController.getEventosGenerados);

// POST /api/calendario — crear recordatorio custom
router.post('/', calendarioController.createRecordatorio);

// PATCH /api/calendario/:id — editar recordatorio custom
router.patch('/:id', calendarioController.updateRecordatorio);

// DELETE /api/calendario/:id — eliminar recordatorio custom
router.delete('/:id', calendarioController.deleteRecordatorio);

export { router as calendarioRoutes };
