import type { AgentTimelineItem } from "@/lib/types";

export function AgentTimeline({ items }: { items: AgentTimelineItem[] }) {
  return (
    <section className="surface-card" style={{ padding: "var(--nl-space-5)", display: "grid", gap: "var(--nl-space-4)" }}>
      <div style={{ display: "flex", justifyContent: "space-between", gap: "var(--nl-space-3)", alignItems: "center" }}>
        <div style={{ fontWeight: 700 }}>Agent activity timeline</div>
        <span className="badge">review UX</span>
      </div>
      {items.map((item) => (
        <div key={item.id} className="surface-muted" style={{ padding: "var(--nl-space-4)", display: "grid", gap: "var(--nl-space-2)" }}>
          <div style={{ display: "flex", justifyContent: "space-between", gap: "var(--nl-space-3)", flexWrap: "wrap" }}>
            <strong>{item.actor}</strong>
            <span style={{ color: "var(--nl-text-secondary)" }}>{item.timestamp}</span>
          </div>
          <div>{item.action}</div>
          <div style={{ color: "var(--nl-text-secondary)" }}>{item.summary}</div>
          <div className="badge" style={{ width: "fit-content" }}>{item.status}</div>
        </div>
      ))}
    </section>
  );
}
