'use client';

import { useParams, useSearchParams } from 'next/navigation';
import { SalesDetail } from '@/components/accounting/SalesManagement/SalesDetail';

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

  return <SalesDetail mode={mode} salesId={salesId} />;
}