'use client';

import { use, useEffect } from 'react';
import { useRouter } from 'next/navigation';

interface EditQuotePageProps {
  params: Promise<{ id: string }>;
}

/**
 * 하위 호환성을 위한 리다이렉트 페이지
 * /quote-management/[id]/edit → /quote-management/[id]?mode=edit
 */
export default function EditQuotePage({ params }: EditQuotePageProps) {
  const { id } = use(params);
  const router = useRouter();

  useEffect(() => {
    router.replace(`/ko/sales/quote-management/${id}?mode=edit`);
  }, [id, router]);

  return (
    <div className="flex items-center justify-center min-h-[400px]">
      <div className="text-muted-foreground">리다이렉트 중...</div>
    </div>
  );
}
