import { notFound } from "next/navigation";
import { getLeadById, getActivityLog, getUpcomingReminders } from "@/lib/lead-service";
import { LeadDetail } from "@/components/admin/leads/LeadDetail";

export default async function LeadDetailPage({ params }: { params: { id: string } }) {
  const lead = await getLeadById(params.id);

  if (!lead) {
    notFound();
  }

  const activities = await getActivityLog(params.id);
  const reminders = await getUpcomingReminders(params.id);

  return <LeadDetail lead={lead} activities={activities} reminders={reminders} />;
}
