import { ProgressPanel } from "@/components/ProgressPanel";
import { DecisionList } from "@/components/DecisionList";
import { useExecutionContext, type PhaseData } from "./ExecutionContext";

interface ProgressSidebarProps {
  phases: PhaseData[];
}

export function ProgressSidebar({ phases }: ProgressSidebarProps) {
  const { tasksComplete, tasksTotal } = useExecutionContext();

  const phasesComplete = phases.filter(
    (p) => p.status === "completed",
  ).length;

  return (
    <div className="space-y-6">
      <ProgressPanel
        phasesComplete={phasesComplete}
        phasesTotal={phases.length}
        tasksComplete={tasksComplete}
        tasksTotal={tasksTotal}
      />

      <DecisionList decisions={[]} />
    </div>
  );
}