import * as React from "react" import type { CSSProperties } from "react" import { AlertDialog as AlertDialogPrimitive } from "@base-ui/react/alert-dialog" import { cn } from "@/lib/utils" import { Button } from "@/components/ui/button" import { getAsChildChildren, getAsChildRender } from "@/lib/as-child" import type { ValueOf } from "@/types/utils" type DragRegionStyle = CSSProperties & { WebkitAppRegion?: 'drag' | 'no-drag' } const ALERT_DIALOG_CONTENT_SIZE = { DEFAULT: "default", SMALL: "sm", } as const type AlertDialogContentSize = ValueOf function AlertDialog({ ...props }: React.ComponentProps) { return } function AlertDialogTrigger({ asChild = false, children, ...props }: React.ComponentProps & { asChild?: boolean }) { return ( {getAsChildChildren(asChild, children)} ) } function AlertDialogPortal({ ...props }: React.ComponentProps) { return ( ) } function AlertDialogOverlay({ className, style, ...props }: React.ComponentProps<"div">) { return (
) } function AlertDialogContent({ className, size = ALERT_DIALOG_CONTENT_SIZE.DEFAULT, showMask = true, style, ...props }: React.ComponentProps & { size?: AlertDialogContentSize showMask?: boolean }) { return ( {showMask ? : null} ) } function AlertDialogHeader({ className, ...props }: React.ComponentProps<"div">) { return (
) } function AlertDialogFooter({ className, ...props }: React.ComponentProps<"div">) { return (
) } function AlertDialogMedia({ className, ...props }: React.ComponentProps<"div">) { return (
) } function AlertDialogTitle({ className, ...props }: React.ComponentProps) { return ( ) } function AlertDialogDescription({ className, ...props }: React.ComponentProps) { return ( ) } function AlertDialogAction({ className, variant = "default", size = "default", ...props }: React.ComponentProps & Pick, "variant" | "size">) { return ( } {...props} /> ) } function AlertDialogCancel({ className, variant = "outline", size = "default", ...props }: React.ComponentProps & Pick, "variant" | "size">) { return ( } {...props} /> ) } export { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogMedia, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, }