import * as React from 'react'; import { X } from 'lucide-react'; import { cn } from '@/lib/utils'; interface DialogContextValue { open: boolean; onOpenChange: (open: boolean) => void; } const DialogContext = React.createContext(undefined); function useDialog() { const context = React.useContext(DialogContext); if (!context) { throw new Error('useDialog must be used within a Dialog'); } return context; } interface DialogProps { open?: boolean; onOpenChange?: (open: boolean) => void; children: React.ReactNode; } const Dialog: React.FC = ({ open = false, onOpenChange, children }) => { return ( {}) }}> {children} ); }; const DialogTrigger = React.forwardRef< HTMLButtonElement, React.ButtonHTMLAttributes >(({ onClick, ...props }, ref) => { const { onOpenChange } = useDialog(); return ( ); } ); DialogContent.displayName = 'DialogContent'; const DialogHeader: React.FC> = ({ className, ...props }) =>
; DialogHeader.displayName = 'DialogHeader'; const DialogFooter: React.FC> = ({ className, ...props }) => (
); DialogFooter.displayName = 'DialogFooter'; const DialogTitle = React.forwardRef>( ({ className, ...props }, ref) => (

) ); DialogTitle.displayName = 'DialogTitle'; const DialogDescription = React.forwardRef< HTMLParagraphElement, React.HTMLAttributes >(({ className, ...props }, ref) => (

)); DialogDescription.displayName = 'DialogDescription'; export { Dialog, DialogTrigger, DialogContent, DialogHeader, DialogFooter, DialogTitle, DialogDescription, };