import { useCallback } from "react";
import { useToast } from "@/components/ui/Toast";

export function useAdminToast() {
  const { toast, showToast, hideToast } = useToast();

  const showSuccess = useCallback(
    (message: string) => showToast(message, "success"),
    [showToast]
  );

  const showError = useCallback(
    (message: string) => showToast(message, "error"),
    [showToast]
  );

  return {
    toast,
    showSuccess,
    showError,
    hideToast,
  };
}

