const express = require('express');
const router = express.Router();
const saleController = require('../controllers/saleController');
// const verifyToken = require('../middlewares/verifyToken');

router.post('/', saleController.createMultiItemSale);
router.get('/', saleController.getFilteredSales);
router.get('/archived', saleController.getArchivedSales);
router.get('/:id', saleController.getSaleById);
router.put('/:id', saleController.updateSale);
router.delete('/:id', saleController.softDeleteSale);
router.put('/:id/restore', saleController.restoreSale);
router.post('/:id/add-payment', saleController.addSalePayment);
router.get('/:id/payments', saleController.getSalePaymentHistory);

router.get('/export/pdf', saleController.exportSalesPdf); // or similar
router.get('/export/excel', saleController.exportSalesExcel);
router.get('/export/print', saleController.exportSalesPrint);

module.exports = router;
