'use client';

import { useSearchParams } from 'next/navigation';
import { CardTransactionInquiry } from '@/components/accounting/CardTransactionInquiry';
import CardTransactionDetailClient from '@/components/accounting/CardTransactionInquiry/CardTransactionDetailClient';

export default function CardTransactionsPage() {
  const searchParams = useSearchParams();
  const mode = searchParams.get('mode');

  if (mode === 'new') {
    return <CardTransactionDetailClient initialMode="create" />;
  }

  return <CardTransactionInquiry />;
}
