const router = require('express').Router();
const ctrl = require('../controllers/report.controller');
const { authenticate } = require('../middlewares/auth');

router.use(authenticate);

router.get('/dashboard', ctrl.dashboard);
router.get('/sales-summary', ctrl.salesSummary);
router.get('/category-breakdown', ctrl.categoryBreakdown);
router.get('/profit-loss', ctrl.profitLoss);
router.get('/top-products', ctrl.topProducts);
router.get('/customer-balances', ctrl.customerBalances);
router.post('/snapshots', ctrl.createSnapshot);
router.get('/snapshots', ctrl.listSnapshots);
router.get('/snapshots/:month', ctrl.getSnapshot);

module.exports = router;
