'use client';

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

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

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

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

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