// lib/hooks/use-toast.ts
"use client";

import { toast } from "react-hot-toast";

export const useToast = () => {
  const showSuccess = (message) => {
    toast.success(message);
  };

  const showError = (message) => {
    toast.error(message);
  };

  const showLoading = (message) => {
    return toast.loading(message);
  };

  const dismissToast = (id) => {
    toast.dismiss(id);
  };

  return {
    showSuccess,
    showError,
    showLoading,
    dismissToast,
  };
};
