'use client';

import { useParams, useSearchParams } from 'next/navigation';
import { WithdrawalDetail } from '@/components/accounting/WithdrawalManagement/WithdrawalDetail';

export default function WithdrawalDetailPage() {
  const params = useParams();
  const searchParams = useSearchParams();
  const withdrawalId = params.id as string;
  const mode = searchParams.get('mode') === 'edit' ? 'edit' : 'view';

  return <WithdrawalDetail withdrawalId={withdrawalId} mode={mode} />;
}