import { UseToastOptions } from '@chakra-ui/react';

interface ShowToast {
  toast: (options: UseToastOptions) => void;
  title: string;
  description?: string;
  status: 'info' | 'warning' | 'success' | 'error';
}

const showToast = ({ toast, title, description, status }: ShowToast) => {
  toast({
    title,
    description,
    status,
    duration: 5000,
    isClosable: true,
    position: 'top-right',
  });
};

export default showToast;
