'use client';

import { useParams } from 'next/navigation';
import { EventDetail, MOCK_EVENTS } from '@/components/customer-center/EventManagement';

export default function EventDetailPage() {
  const params = useParams();
  const eventId = params.id as string;

  // Mock 데이터에서 이벤트 찾기
  const event = MOCK_EVENTS.find((e) => e.id === eventId);

  if (!event) {
    return (
      <div className="flex items-center justify-center h-full">
        <p className="text-muted-foreground">이벤트를 찾을 수 없습니다.</p>
      </div>
    );
  }

  return <EventDetail event={event} />;
}