import * as React from 'react';
import { ChevronDown, ChevronUp } from 'lucide-react';
import { cn } from '@/lib/utils';
import { Card, CardHeader, CardTitle, CardContent } from './card';
export interface CollapsibleProps {
/**
* Content to display when collapsed (header/trigger)
*/
trigger: React.ReactNode;
/**
* Content to display when expanded
*/
children: React.ReactNode;
/**
* Whether the collapsible is open by default
* @default false
*/
defaultOpen?: boolean;
/**
* Controlled open state
*/
open?: boolean;
/**
* Callback when open state changes
*/
onOpenChange?: (open: boolean) => void;
/**
* Additional CSS classes for the container
*/
className?: string;
/**
* Additional CSS classes for the trigger button
*/
triggerClassName?: string;
/**
* Additional CSS classes for the content
*/
contentClassName?: string;
/**
* Whether to show the chevron icon
* @default true
*/
showChevron?: boolean;
}
/**
* Collapsible - Reusable collapsible component
*
* A component that can be expanded/collapsed to show/hide content.
* Supports both controlled and uncontrolled modes.
*
* @example
* ```tsx
* Click to expand}>
*