import * as React from "react"; import * as DialogPrimitive from "@radix-ui/react-dialog"; import { X } from "lucide-react"; import { useTranslation } from "react-i18next"; import { cn } from "@/lib/utils"; const Dialog = DialogPrimitive.Root; const DialogPortal = DialogPrimitive.Portal; const DialogOverlay = React.forwardRef< React.ElementRef, React.ComponentPropsWithoutRef >(({ className, ...props }, ref) => ( )); DialogOverlay.displayName = DialogPrimitive.Overlay.displayName; interface DialogContentProps extends React.ComponentPropsWithoutRef { showCloseButton?: boolean; } const DialogContent = React.forwardRef< React.ElementRef, DialogContentProps >(({ className, children, showCloseButton = true, ...props }, ref) => { const { t } = useTranslation(); return (
{children} {showCloseButton ? ( {t("common.close")} ) : null}
); }); DialogContent.displayName = DialogPrimitive.Content.displayName; const DialogHeader = ({ className, ...props }: React.HTMLAttributes) => (
); DialogHeader.displayName = "DialogHeader"; const DialogFooter = ({ className, ...props }: React.HTMLAttributes) => (
); DialogFooter.displayName = "DialogFooter"; const DialogTitle = React.forwardRef< React.ElementRef, React.ComponentPropsWithoutRef >(({ className, ...props }, ref) => ( )); DialogTitle.displayName = DialogPrimitive.Title.displayName; const DialogDescription = React.forwardRef< React.ElementRef, React.ComponentPropsWithoutRef >(({ className, ...props }, ref) => ( )); DialogDescription.displayName = DialogPrimitive.Description.displayName; export { Dialog, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, };