import { useContext } from "react";
import { ActionToastContext } from "../context/ActionToastContext";

export default function useActionToast() {
  const context = useContext(ActionToastContext);
  if (!context) {
    throw new Error("useActionToast must be used within an ActionToastProvider");
  }
  return context;
}
