import { useToastProviderContext } from "./provider/toast-provider-context.jsx";

/**
 * Shape of a single toast instance in the queue. Mirrors Base UI React's
 * `ToastObject<Data>` with Solid-flavored `JSX.Element` replacing React's
 * `ReactNode`.
 */

/**
 * Hook: returns the ambient `<Toast.Provider>`'s queue + mutators.
 *
 * Port notes:
 *
 *  - React's `useMemo` wrapping is unnecessary — the underlying store is a
 *    stable object and its mutator functions are stable for the provider's
 *    lifetime.
 *  - `toasts` is an accessor (not a plain array snapshot) so callers stay
 *    reactive across add/close/update.
 */
export function useToastManager() {
  const store = useToastProviderContext();
  return {
    toasts: store.toasts,
    add: store.addToast,
    close: store.closeToast,
    update: store.updateToast,
    promise: store.promiseToast
  };
}
//# sourceMappingURL=use-toast-manager.jsx.map
