"use client"; import {AlertDialog as BaseAlertDialog} from "@base-ui/react/alert-dialog"; import {mergeProps} from "@base-ui/react/merge-props"; import {useRender} from "@base-ui/react/use-render"; import * as React from "react"; import {cn} from "@/lib/utilities"; import styles from "./alert-dialog.module.css"; import buttonStyles from "./button.module.css"; interface AlertDialogProps extends React.ComponentPropsWithRef {} interface AlertDialogTriggerProps extends Omit, "className"> { /** Additional CSS classes merged with the alert-dialog trigger styles. @default undefined */ className?: string; /** Backward-compatible child-slot API that maps the child element to `render`. @default false @deprecated Prefer Base UI's `render` prop. */ asChild?: boolean; } interface AlertDialogOverlayProps extends Omit, "className"> { /** Additional CSS classes merged with the alert-dialog backdrop styles. @default undefined */ className?: string; } interface AlertDialogContentProps extends Omit, "className"> { /** Additional CSS classes merged with the alert-dialog popup styles. @default undefined */ className?: string; } interface AlertDialogHeaderProps extends React.ComponentPropsWithRef<"div"> { /** Additional CSS classes merged with the alert-dialog header layout styles. @default undefined */ className?: string; /** Custom element or render callback used to replace the default header container. @default undefined */ render?: useRender.RenderProp>; /** Backward-compatible child-slot API that maps the child element to `render`. @default false @deprecated Prefer the `render` prop. */ asChild?: boolean; } interface AlertDialogFooterProps extends React.ComponentPropsWithRef<"div"> { /** Additional CSS classes merged with the alert-dialog footer layout styles. @default undefined */ className?: string; /** Custom element or render callback used to replace the default footer container. @default undefined */ render?: useRender.RenderProp>; /** Backward-compatible child-slot API that maps the child element to `render`. @default false @deprecated Prefer the `render` prop. */ asChild?: boolean; } interface AlertDialogTitleProps extends Omit, "className"> { /** Additional CSS classes merged with the alert-dialog title styles. @default undefined */ className?: string; } interface AlertDialogDescriptionProps extends Omit, "className"> { /** Additional CSS classes merged with the alert-dialog description styles. @default undefined */ className?: string; } interface AlertDialogActionProps extends Omit, "className"> { /** Additional CSS classes merged with the primary action button styles. @default undefined */ className?: string; } interface AlertDialogCancelProps extends Omit, "className"> { /** Additional CSS classes merged with the cancel action button styles. @default undefined */ className?: string; } /** * Coordinates destructive confirmation dialogs with modal accessibility behavior. * * @remarks * - Renders no DOM element by default and coordinates descendant alert-dialog parts * - Built on {@link https://base-ui.com/react/components/alert-dialog | Base UI Alert Dialog} * - Supports composition through descendant `render` props * - Styling via CSS Modules with `--ac-*` custom properties * * @example Basic usage * ```tsx * * Delete * * Are you sure? * * * ``` * * @see {@link https://base-ui.com/react/components/alert-dialog | Base UI Documentation} */ function AlertDialog(props: Readonly): React.ReactElement { return ; } AlertDialog.displayName = "AlertDialog"; /** * Opens the alert dialog from an interactive trigger element. * * @remarks * - Renders a `