import { useState } from "react"; import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card.jsx"; import { Button } from "@/components/ui/button.jsx"; import { ChevronDown, ChevronUp } from "lucide-react"; const ToggleChartCard = ({ title, children, defaultOpen = false, alwaysVisible = false }) => { const [isOpen, setIsOpen] = useState(defaultOpen || alwaysVisible); return ( {title} {!alwaysVisible && ( )} {isOpen && ( {children} )} ); }; export default ToggleChartCard;