'use client';

import { useSearchParams } from 'next/navigation';
import { PartnerListClient } from '@/components/business/construction/partners';
import PartnerForm from '@/components/business/construction/partners/PartnerForm';

export default function PartnersPage() {
  const searchParams = useSearchParams();
  const mode = searchParams.get('mode');

  if (mode === 'new') {
    return <PartnerForm mode="new" />;
  }

  return <PartnerListClient />;
}
