"use client";
import {
CheckCircle,
ChevronDown,
Sparkles,
Circle,
Check,
} from "lucide-react";
import { useState } from "react";
import { cn } from "@/lib/utils";
import { Button } from "../ui/button";
import { Badge } from "../ui/badge";
import { HumanResponse } from "@langchain/langgraph/prebuilt";
type PlanItem = {
index: number;
plan: string;
completed: boolean;
};
type AcceptedPlanStepProps = {
planTitle?: string;
planItems?: PlanItem[];
interruptType?: HumanResponse["type"];
collapse?: boolean;
};
export function AcceptedPlanStep({
planTitle,
planItems = [],
interruptType,
collapse: collapseProp = true,
}: AcceptedPlanStepProps) {
const [collapsed, setCollapsed] = useState(collapseProp);
const getStatusText = () => {
if (interruptType === "edit") {
return "Plan revised and approved";
}
return "Plan approved and ready";
};
const getStatusBadge = () => {
return (
{totalCount} steps
)}{planTitle}
{item.plan}