'use client';

import { useSearchParams } from 'next/navigation';
import { BendingModelList } from '@/components/production/bending/BendingModelList';
import { BendingModelForm } from '@/components/production/bending/BendingModelForm';

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

  if (mode === 'new') return <BendingModelForm mode="new" category="GUIDERAIL_MODEL" />;
  return <BendingModelList category="GUIDERAIL_MODEL" />;
}
