import { Toaster, toast } from 'sonner'

export const ToastContainer = () => {
  return (
    <Toaster
      position="top-right"
      theme="system"
      richColors
      closeButton
    />
  )
}

export const showToast = {
  success: (message) => toast.success(message),
  error: (message) => toast.error(message),
  loading: (message) => toast.loading(message),
  info: (message) => toast.info(message),
  promise: (promise, messages) => toast.promise(promise, messages),
}
