import { ChevronDown } from "lucide-react"; import { useState, type ReactNode, type Ref } from "react"; import { cn } from "@/lib/utils"; interface ThinkingReasoningShellProps { active: boolean; expanded: boolean; label: string; children: ReactNode; viewportRef: Ref; contentRef: Ref; fadeTop: boolean; fadeBottom: boolean; hasDetails?: boolean; onToggle: () => void; onScroll: () => void; } export function ThinkingReasoningShell({ active, expanded, label, children, viewportRef, contentRef, fadeTop, fadeBottom, hasDetails = true, onToggle, onScroll, }: ThinkingReasoningShellProps) { const [hasExpanded, setHasExpanded] = useState(expanded); if (expanded && !hasExpanded) setHasExpanded(true); return (
{hasDetails ? ( ) : (
{label}
)} {hasDetails ? (
{hasExpanded ? children : null}
{fadeTop ? ( ) : null} {fadeBottom ? ( ) : null}
) : null}
); }