'use client';

import { useParams } from 'next/navigation';
import { NoticeDetail, MOCK_NOTICES } from '@/components/customer-center/NoticeManagement';

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

  // Mock 데이터에서 해당 공지사항 찾기
  const notice = MOCK_NOTICES.find((n) => n.id === id);

  if (!notice) {
    return (
      <div className="flex items-center justify-center h-64">
        <p className="text-muted-foreground">공지사항을 찾을 수 없습니다.</p>
      </div>
    );
  }

  return <NoticeDetail notice={notice} />;
}