'use client';

import { useSearchParams } from 'next/navigation';
import StageForm from '@/components/StageForm';
import { Suspense } from 'react';

function FormContainer() {
  const searchParams = useSearchParams();
  const contactId = searchParams.get('contactId') || '2';
  const orgId = searchParams.get('orgId') || '1';

  return <StageForm contactId={contactId} orgId={orgId} />;
}

export default function Home() {
  return (
    <main className="min-h-screen bg-gray-100 py-12">
      <Suspense fallback={<div className="text-center">Loading...</div>}>
        <FormContainer />
      </Suspense>
    </main>
  );
}
