'use client';

import { useSearchParams } from 'next/navigation';
import { CardManagement } from '@/components/hr/CardManagement';
import { CardDetail } from '@/components/hr/CardManagement/CardDetail';

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

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

  return <CardManagement />;
}
