import { Route } from 'react-router-dom';
import { SentryRoutes } from '@/shared/configs/sentry';
import { ROUTE_NAMES } from '@/shared/constants/route-names';
import { AllTransactionListPage } from './all-transaction/list-page';
import { AllTransactionDetailPage } from './all-transaction/detail-page';
import { AllTransactionCancelPage } from './all-transaction/cancel-page';
import { CashReceiptListPage } from './cash-receipt/list-page';
import { CashReceiptDetailPage } from './cash-receipt/detail-page';
import { CashReceitHandWrittenIssuancePage } from './cash-receipt/hand-written-issuance-page';
import { EscrowListPage } from './escrow/list-page';
import { EscrowDetailPage } from './escrow/detail-page';
import { BillingListPage } from './billing/list-page';
import { BillingDetailPage } from './billing/detail-page';
import { BillingChargePage } from './billing/charge-page';


export const TransactionPages = () => {
  return (
    <>
      <SentryRoutes>
        <Route path={ROUTE_NAMES.transaction.allTransaction.base}>
          <Route path={ROUTE_NAMES.transaction.allTransaction.list} element={<AllTransactionListPage />} />
          <Route path={ROUTE_NAMES.transaction.allTransaction.detail} element={<AllTransactionDetailPage />} />
          <Route path={ROUTE_NAMES.transaction.allTransaction.cancel} element={<AllTransactionCancelPage />} />
        </Route>
        <Route path={ROUTE_NAMES.transaction.cashReceipt.base}>
          <Route path={ROUTE_NAMES.transaction.cashReceipt.list} element={<CashReceiptListPage />} />
          <Route path={ROUTE_NAMES.transaction.cashReceipt.detail} element={<CashReceiptDetailPage />} />
          <Route path={ROUTE_NAMES.transaction.cashReceipt.handWrittenIssuance} element={<CashReceitHandWrittenIssuancePage />} />
        </Route>
        <Route path={ROUTE_NAMES.transaction.escrow.base}>
          <Route path={ROUTE_NAMES.transaction.escrow.list} element={<EscrowListPage />} />
          <Route path={ROUTE_NAMES.transaction.escrow.detail} element={<EscrowDetailPage />} />
        </Route>
        <Route path={ROUTE_NAMES.transaction.billing.base}>
          <Route path={ROUTE_NAMES.transaction.billing.list} element={<BillingListPage />} />
          <Route path={ROUTE_NAMES.transaction.billing.detail} element={<BillingDetailPage />} />
          <Route path={ROUTE_NAMES.transaction.billing.charge} element={<BillingChargePage />} />
        </Route>
      </SentryRoutes>
    </>
  );
};
