import { Toast } from "@/hooks/useToast";

interface ToastComponentProps {
  toast: Toast | null;
}

/**
 * Compatibility shim.
 *
 * Toasts are rendered by Sonner's `<Toaster />`, mounted once in
 * ClientRootLayout. This component no longer renders anything; it is kept so
 * the 16 forms that mount `<ToastComponent toast={toast} />` keep compiling
 * while they are migrated. New code should call `showToast` (or `toast` from
 * "sonner") directly and not mount this at all.
 *
 * @deprecated Remove the `<ToastComponent />` mount from a form when you next
 * touch it — `useToast().showToast` is all that is needed.
 */
export function ToastComponent(_props: ToastComponentProps) {
  return null;
}
