// Import necessary dependencies and utilities import * as React from "react" import * as AlertDialogPrimitive from "@radix-ui/react-alert-dialog" import { cn } from "../../design-lib/utils" import { buttonVariants } from "./button" // Define the root component for the alert dialog const AlertDialog = AlertDialogPrimitive.Root // Define the trigger component for the alert dialog const AlertDialogTrigger = AlertDialogPrimitive.Trigger // Define the portal component for the alert dialog const AlertDialogPortal = ({ ...props }: AlertDialogPrimitive.AlertDialogPortalProps) => ( ) AlertDialogPortal.displayName = AlertDialogPrimitive.Portal.displayName // Define the overlay component for the alert dialog const AlertDialogOverlay = React.forwardRef< React.ElementRef, React.ComponentPropsWithoutRef >((props, ref) => ( )) AlertDialogOverlay.displayName = AlertDialogPrimitive.Overlay.displayName // Define the content component for the alert dialog const AlertDialogContent = React.forwardRef< React.ElementRef, React.ComponentPropsWithoutRef >((props, ref) => ( )) AlertDialogContent.displayName = AlertDialogPrimitive.Content.displayName // Define the header component for the alert dialog const AlertDialogHeader = ({ className, ...props }: React.HTMLAttributes) => (
) AlertDialogHeader.displayName = "AlertDialogHeader" // Define the footer component for the alert dialog const AlertDialogFooter = ({ className, ...props }: React.HTMLAttributes) => (
button]:my-1 [&>button]:h-10 sm:[&>button]:my-0 ", className )} {...props} /> ) AlertDialogFooter.displayName = "AlertDialogFooter" // Define the title component for the alert dialog const AlertDialogTitle = React.forwardRef< React.ElementRef, React.ComponentPropsWithoutRef >((props, ref) => ( )) AlertDialogTitle.displayName = AlertDialogPrimitive.Title.displayName // Define the description component for the alert dialog const AlertDialogDescription = React.forwardRef< React.ElementRef, React.ComponentPropsWithoutRef >((props, ref) => ( )) AlertDialogDescription.displayName = AlertDialogPrimitive.Description.displayName // Define the action component for the alert dialog const AlertDialogAction = React.forwardRef< React.ElementRef, React.ComponentPropsWithoutRef & { variant?: "default" | "error" | "secondary" | "outline" | "ghost" | "link" } >((props, ref) => ( )) AlertDialogAction.displayName = AlertDialogPrimitive.Action.displayName // Define the cancel component for the alert dialog const AlertDialogCancel = React.forwardRef< React.ElementRef, React.ComponentPropsWithoutRef >((props, ref) => ( )) AlertDialogCancel.displayName = AlertDialogPrimitive.Cancel.displayName // Export all the defined components export { AlertDialog, AlertDialogTrigger, AlertDialogContent, AlertDialogHeader, AlertDialogFooter, AlertDialogTitle, AlertDialogDescription, AlertDialogAction, AlertDialogCancel, }