'use client' import { cn } from '@/lib/utils' import { ChevronDown } from 'lucide-react' import { useState } from 'react' import { motion, AnimatePresence } from 'framer-motion' interface PanelSectionProps { title: string children: React.ReactNode defaultExpanded?: boolean className?: string } export function PanelSection({ title, children, defaultExpanded = true, className, }: PanelSectionProps) { const [isExpanded, setIsExpanded] = useState(defaultExpanded) return ( setIsExpanded(!isExpanded)} className={cn( "group/section flex items-center justify-between h-10 px-3 transition-all duration-200 shrink-0", isExpanded ? "bg-accent/50 text-foreground" : "text-muted-foreground hover:bg-accent/30 hover:text-foreground" )} > {title} {isExpanded && (
{children}
)}
) }