import { ClientDetail } from '@/components/clients/client-detail';
import { auth } from '@/lib/auth';
import { headers } from 'next/headers';

interface ClientDetailPageProps {
  params: Promise<{ clientId: string }>;
}

export default async function ClientDetailPage({ params }: ClientDetailPageProps) {
  const { clientId } = await params;

  const session = await auth.api.getSession({ headers: await headers() });
  const currentUserId = session?.user?.id;

  return <ClientDetail clientId={clientId} currentUserId={currentUserId} />;
}
