import express from 'express';
import {
    getDashboardStats,
    getFinanceDashboard,
    getRevenueExpenseChart,
    getExpenseBreakdown,
    getRecentInvoices,
    getRecentExpenses,
    getTopClients,
    getCompleteDashboard,
    getRecentDomains,
    getRecentHosting,
    getRecentLeads,
    getUnpaidBills,
    TotalReceiveAmount,
    TotalProfit
} from '../controller/dashboardController.js';
import { authenticateUser } from '../middleware/authMiddleware.js';

const router = express.Router();

router.get('/', authenticateUser, getDashboardStats);
router.get('/finance/stats', authenticateUser, getFinanceDashboard);
router.get('/finance/chart', authenticateUser, getRevenueExpenseChart);
router.get('/finance/expenses-breakdown', authenticateUser, getExpenseBreakdown);
router.get('/finance/recent-invoices', authenticateUser, getRecentInvoices);
router.get('/finance/recent-expenses', authenticateUser, getRecentExpenses);
router.get('/finance/top-clients', authenticateUser, getTopClients);
router.get('/finance/complete', authenticateUser, getCompleteDashboard);
router.get('/domains/recent', authenticateUser, getRecentDomains);
router.get('/hosting/recent', authenticateUser, getRecentHosting);
router.get('/leads/recent', authenticateUser, getRecentLeads);
router.get('/bills/unpaid', authenticateUser, getUnpaidBills);


router.get('/finance/amount-distribution', authenticateUser, TotalReceiveAmount);
router.get('/finance/profit', authenticateUser, TotalProfit);

export default router;
