import {toast} from "react-toastify";
import {ToastOptions} from "react-toastify";

const options:ToastOptions = {
    position: "top-right",
    autoClose: 2500,
    hideProgressBar: true,
    closeOnClick: true,
    pauseOnHover: false,
    draggable: true,
    progress: undefined,
}

export const toastSuccess = (message:string) => toast.success(message, options)

export const toastError = (message:string) => toast.error(message, options)

export const toastWarn = (message:string) => toast.warn(message, options)

export const toastInfo = (message:string) => {
    toast.info(message, options)
}

