import React from "react"; import { X } from "lucide-react"; import { Button } from "./button"; interface DialogProps { open: boolean; onOpenChange: (open: boolean) => void; children: React.ReactNode; } interface DialogContentProps { children: React.ReactNode; className?: string; } interface DialogHeaderProps { children: React.ReactNode; className?: string; } interface DialogTitleProps { children: React.ReactNode; className?: string; } interface DialogDescriptionProps { children: React.ReactNode; className?: string; } interface DialogFooterProps { children: React.ReactNode; } export function Dialog({ open, onOpenChange, children }: DialogProps) { if (!open) return null; const handleBackdropClick = () => { // Close the modal when backdrop is clicked onOpenChange(false); }; const handleContentClick = (e: React.MouseEvent) => { // Stop any clicks inside the content from bubbling to backdrop e.stopPropagation(); }; const handleContentMouseDown = (e: React.MouseEvent) => { // Prevent mousedown from bubbling during text selection e.stopPropagation(); }; return (
{children}
; } export function DialogClose({ onClose }: { onClose: () => void }) { return ( ); } export function DialogFooter({ children }: DialogFooterProps) { return (