/* * SPDX-FileCopyrightText: 2020 Stalwart Labs LLC * * SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-SEL */ import * as React from 'react'; import { cva, type VariantProps } from 'class-variance-authority'; import { X } from 'lucide-react'; import { cn } from '@/lib/utils'; const ToastViewport = React.forwardRef>( ({ className, ...props }, ref) => (
    ), ); ToastViewport.displayName = 'ToastViewport'; const toastVariants = cva( 'group pointer-events-auto relative flex w-full items-center justify-between space-x-2 overflow-hidden rounded-md border p-4 pr-6 shadow-lg transition-all data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full', { variants: { variant: { default: 'border bg-background text-foreground', destructive: 'destructive group border-destructive bg-destructive text-destructive-foreground', success: 'border-green-500 bg-background text-foreground', warning: 'border-yellow-500 bg-background text-foreground', info: 'border-blue-500 bg-background text-foreground', }, }, defaultVariants: { variant: 'default', }, }, ); const Toast = React.forwardRef< HTMLLIElement, React.HTMLAttributes & VariantProps & { open?: boolean; onOpenChange?: (open: boolean) => void; } // eslint-disable-next-line @typescript-eslint/no-unused-vars >(({ className, variant, open, onOpenChange, ...props }, ref) => (
  1. )); Toast.displayName = 'Toast'; const ToastClose = React.forwardRef>( ({ className, ...props }, ref) => ( ), ); ToastClose.displayName = 'ToastClose'; const ToastTitle = React.forwardRef>( ({ className, ...props }, ref) => (
    ), ); ToastTitle.displayName = 'ToastTitle'; const ToastDescription = React.forwardRef>( ({ className, ...props }, ref) =>
    , ); ToastDescription.displayName = 'ToastDescription'; export { ToastViewport, Toast, ToastTitle, ToastDescription, ToastClose, toastVariants }; export type { VariantProps };