import clsx from 'clsx';
import { MdCheck, MdClose, MdWarning } from 'react-icons/md';
import { toast as toastFn, Zoom } from 'react-toastify';
import { Paragraph } from '../Paragraph';
const iconClasses = clsx('size-6 rounded-full p-0.5 text-white');
const icons = {
    success: <MdCheck className={clsx(iconClasses, 'bg-success')}/>,
    warning: <MdWarning className={clsx(iconClasses, 'bg-warning')}/>,
    error: <MdClose className={clsx(iconClasses, 'bg-error')}/>,
};
const backgrounds = {
    success: '#E8F6ED',
    warning: '#FFF3DB',
    error: '#FCEAEA',
};
/**
 * Displays a toast notification with customizable content and type.
 *
 * @function
 * @example
 * // Example usage of showToast function
 * showToast(<span>Operation successful</span>, 'success');
 *
 * @param {ReactNode} content - The content to be displayed inside the toast notification.
 * @param {'success' | 'warning' | 'error'} type - The type of the toast notification, which determines the icon and background color.
 *
 * @returns {void}
 */
export function showToast(content, type) {
    toastFn(<Paragraph className="text-black">{content}</Paragraph>, {
        position: 'top-right',
        hideProgressBar: true,
        pauseOnFocusLoss: false,
        transition: Zoom,
        icon: () => icons[type],
        style: {
            background: backgrounds[type],
        },
    });
}
//# sourceMappingURL=Toast.jsx.map