import { Router } from 'express';
import { requirePermission } from '../../core/guards/rbac.guard';
import { requireTraceContext } from '../../core/guards/trace-context.guard';
import { CurrencyController } from '../controllers/CurrencyController';

const router = Router();

// 货币管理相关路由
// 暂时注释掉，因为对应的方法已被注释掉
// router.get('/currencies', CurrencyController.getCurrencies);
// router.get('/currencies/:code', CurrencyController.getCurrencyByCode);
// router.get('/currencies/default', CurrencyController.getDefaultCurrency);
// router.post('/currencies', requireTraceContext, requirePermission('currency:write'), CurrencyController.createCurrency);
// router.put('/currencies/:id', requireTraceContext, requirePermission('currency:write'), CurrencyController.updateCurrency);
// router.patch('/currencies/:id/deactivate', requireTraceContext, requirePermission('currency:write'), CurrencyController.deactivateCurrency);
// router.patch('/currencies/:id/set-default', requireTraceContext, requirePermission('currency:write'), CurrencyController.setDefaultCurrency);

// 汇率相关路由
router.get('/exchange-rates/:from/:to', CurrencyController.getExchangeRate);
router.post('/exchange-rates/update', requireTraceContext, requirePermission('currency:write'), CurrencyController.updateExchangeRates);
router.get('/exchange-rates/history/:from/:to', CurrencyController.getExchangeRateHistory);
router.get('/exchange-rates/all', CurrencyController.getAllExchangeRates);

// 货币转换相关路由
// 暂时注释掉，因为对应的方法已被注释掉
// router.post('/convert', CurrencyController.convertCurrency);
// router.post('/convert-multiple', CurrencyController.convertMultipleCurrencies);
// router.post('/convert-to-default', CurrencyController.convertToDefaultCurrency);
// router.post('/convert-from-default', CurrencyController.convertFromDefaultCurrency);

// 货币计算相关路由
// 暂时注释掉，因为对应的方法已被注释掉
// router.post('/calculate/price', CurrencyController.calculatePrice);
// router.post('/calculate/profit', CurrencyController.calculateProfit);
// router.post('/calculate/profit-percentage', CurrencyController.calculateProfitPercentage);
// router.post('/calculate/break-even', CurrencyController.calculateBreakEvenPrice);
// router.post('/calculate/markup-percentage', CurrencyController.calculateMarkupPercentage);

export default router;
