'use client';

/**
 * 설비 등록대장 - 목록/등록
 * URL: /quality/equipment
 * URL: /quality/equipment?mode=new (등록)
 */

import { useSearchParams } from 'next/navigation';
import { EquipmentManagement } from '@/components/quality/EquipmentManagement';
import { EquipmentForm } from '@/components/quality/EquipmentManagement/EquipmentForm';

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

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

  return <EquipmentManagement />;
}
