import { AlertDialog as BaseAlertDialog } from '@base-ui/react/alert-dialog' import { useState, type ReactElement, type ReactNode } from 'react' import { cn } from '../lib/cn' import { useControllableState } from '../lib/useControllableState' import { Button } from './Button' import { ALERT_ICON_STYLES, backdropClass, dialogDescriptionClass, dialogPanelClass, dialogTitleClass, type AlertDialogColor, } from './dialog.tokens' export type AlertDialogProps = { /** Controlled open state. Pair with `onOpenChange`. */ open?: boolean /** Initial open state when uncontrolled. */ defaultOpen?: boolean /** Fires with the next open state. */ onOpenChange?: (open: boolean) => void /** Element that opens the dialog, usually a ` ) }