/**
 * Accountant Routes
 * 
 * Routes accessible only to accountants
 */

import { lazy } from 'react';
import { RouteObject, Navigate } from 'react-router-dom';

const AccountantDashboardPage = lazy(() => import('../pages/accountant/DashboardPage'));
const PaymentManagementPage = lazy(() => import('../pages/accountant/PaymentManagementPage'));
const InvoiceManagementPage = lazy(() => import('../pages/accountant/InvoiceManagementPage'));
const AnalyticsDashboardPage = lazy(() => import('../pages/accountant/AnalyticsDashboardPage'));

const accountantRoutes: RouteObject[] = [
  {
    path: '/accountant',
    children: [
      { index: true, element: <Navigate to="dashboard" replace /> },
      { path: 'dashboard', element: <AccountantDashboardPage /> },
      { path: 'payments', element: <PaymentManagementPage /> },
      { path: 'invoices', element: <InvoiceManagementPage /> },
      { path: 'reports', element: <AnalyticsDashboardPage /> },
    ],
  },
];

export default accountantRoutes;

