import { type Dispatch, type SetStateAction } from 'react';
export interface UseSelfFetchResult<T> {
    data: T | null;
    /** Imperatively patch the fetched data (e.g. optimistic vote updates). */
    setData: Dispatch<SetStateAction<T | null>>;
    isLoading: boolean;
    error: boolean;
    /** Re-run the fetch (error-retry affordance). */
    reload: () => void;
}
/**
 * The single source for the 4 self-fetching content views
 * (`ProductReleasesView`, `RoadmapView`, the onboarding catalog/detail). GETs a
 * configured `url` into component state with **plain `fetch` + `useEffect`** —
 * deliberately NO react-query, so embedders don't need a QueryClient. This is
 * the same technology choice the shipped `DeliveryLists` makes; that component
 * predates this hook and still hand-rolls the loop (a future pass can migrate
 * it onto a two-url variant of this hook).
 *
 * Behaviour:
 *   - `url = null` → fetching is DISABLED (controlled / SSR mode, or missing
 *     config); returns `initialData ?? null` and never fetches.
 *   - `initialData` provided → hydrates immediately and SKIPS the first fetch
 *     (so the hub's server-rendered data isn't re-fetched on mount); later
 *     `url` changes still re-fetch.
 *   - a `cancelled` guard ensures an in-flight response from a STALE `url`
 *     (e.g. a fast pagination / section toggle) can't overwrite a newer one.
 *   - `reload()` bumps an internal key to retry after an error.
 *
 * Re-fetches whenever `url` changes, so callers fold all query params INTO the
 * url string (the url IS the cache key).
 */
export declare function useSelfFetch<T>(url: string | null, options?: {
    initialData?: T;
}): UseSelfFetchResult<T>;
//# sourceMappingURL=use-self-fetch.d.ts.map