"use client"; import { Check, Terminal, X } from "lucide-react"; import { AnimatePresence, motion, useReducedMotion } from "motion/react"; import type { ReactNode } from "react"; import { EASE_OUT } from "@/lib/ease"; import { cn } from "@/lib/utils"; export type ToolApprovalStatus = "pending" | "approved" | "denied"; export interface ToolApprovalProps { /** What the agent wants to do. */ title: ReactNode; /** The exact command, file path, or other detail worth reading before approving. */ description?: ReactNode; /** Default "pending". Acting on the request is up to the caller: set this once onApprove or onDeny fires. */ status?: ToolApprovalStatus; onApprove?: () => void; onDeny?: () => void; approveLabel?: string; denyLabel?: string; className?: string; } const RESOLVED_ICON: Record<"approved" | "denied", ReactNode> = { approved: