'use client'; import {AlertCircleIcon, InfoIcon} from 'lucide-react'; import React, {type ReactNode} from 'react'; import {chain} from 'react-aria/chain'; import {type DialogProps} from 'react-aria-components/Dialog'; import {Heading} from 'react-aria-components/Heading'; import {Button} from './Button'; import {Dialog} from './Dialog'; interface AlertDialogProps extends Omit { title: string; children: ReactNode; variant?: 'info' | 'destructive'; actionLabel: string; cancelLabel?: string; onAction?: () => void; } export function AlertDialog({ title, variant, cancelLabel, actionLabel, onAction, children, ...props }: AlertDialogProps) { return ( {({close}) => ( <> {title}
{variant === 'destructive' ? : }

{children}

)}
); }