/** 决策线程详情页 — 状态机时间线 + 关联事件 + AAR 链接。 */

"use client";

import { ThreadDetail } from "@/components/threads/ThreadDetail";
import type { TimelineNode } from "@/components/threads/ThreadDetail";
import type { RelatedEvent } from "@/components/threads/ThreadDetail";

/** 决策线程详情页面。 */
export default function ThreadDetailPage({ params }: { params: { id: string } }) {
  const timeline: TimelineNode[] = [
    { status: "identified", label: "已识别", date: "2026-07-09", description: "Runway 不足 7 月，弱信号触发", active: true },
    { status: "analyzing", label: "分析中", date: "2026-07-12", description: "对比天使+ vs Pre-A 方案", active: true },
    { status: "acted", label: "已行动", date: "—", active: false },
    { status: "closed", label: "已关闭", date: "—", active: false },
  ];

  const relatedEvents: RelatedEvent[] = [
    { type: "risk", title: "现金 Runway 不足 7 月", href: "/risks" },
    { type: "report", title: "2026 年 6 月月报", href: "/reports" },
    { type: "task", title: "准备天使+轮 BP", href: "/tasks" },
  ];

  return (
    <ThreadDetail
      threadId={params.id}
      title="量子芯微 融资策略：天使+ vs Pre-A"
      company="量子芯微"
      status="analyzing"
      timeline={timeline}
      relatedEvents={relatedEvents}
    />
  );
}
