import React, { FC } from 'react'
import { Bounce, toast, ToastPosition } from 'react-toastify';

interface PageProps{
  message: string;
  theme?: string;
  position?: ToastPosition;
  autoClose?: number;
  forAutoRefresh?: boolean;
}

const useShowToast:FC<PageProps> = ({
  message, 
  theme = 'dark', 
  position='bottom-right', 
  autoClose=5000
}) => {
  return (
    toast.info(message, {
        position: position,
        theme: theme,
        transition: Bounce,
        autoClose: autoClose,
        
    })
  )
}

export default useShowToast
