"use client"; import { Dialog as DialogPrimitive } from "@base-ui/react/dialog"; import { XIcon } from "lucide-react"; import type * as React from "react"; import { Button } from "@/components/ui/button"; import { resolveAsChild } from "@/lib/as-child"; import { cn } from "@/lib/utils"; function Dialog({ ...props }: DialogPrimitive.Root.Props) { return ; } function DialogTrigger({ asChild = false, children, render, ...props }: DialogPrimitive.Trigger.Props & { asChild?: boolean }) { const resolved = resolveAsChild(asChild, children, render); return ( {resolved.children} ); } function DialogPortal({ ...props }: DialogPrimitive.Portal.Props) { return ; } function DialogOverlay({ className, ...props }: DialogPrimitive.Backdrop.Props) { return ( ); } function DialogContent({ className, children, showCloseButton = true, onInteractOutside: _onInteractOutside, ...props }: DialogPrimitive.Popup.Props & { showCloseButton?: boolean; /** @deprecated Radix compat — prefer Dialog `disablePointerDismissal` */ onInteractOutside?: (event: { preventDefault: () => void }) => void; }) { return ( {children} {showCloseButton && ( Close )} ); } function DialogHeader({ className, ...props }: React.ComponentProps<"div">) { return (
); } function DialogFooter({ className, showCloseButton = false, children, ...props }: React.ComponentProps<"div"> & { showCloseButton?: boolean; }) { return (
{children} {showCloseButton && ( }> Close )}
); } function DialogTitle({ className, ...props }: DialogPrimitive.Title.Props) { return ( ); } function DialogDescription({ className, ...props }: DialogPrimitive.Description.Props) { return ( ); } export { Dialog, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, };