/**
 * useSSE — React hook wrapper around `SSEManager`.
 * @countermeasure-platform/web-components/services/sse-react
 *
 * Wires `SSEManager` to component lifecycle: connects on mount, disconnects
 * on unmount, and re-attaches when `url` or `withCredentials` change.
 * `events` is read via a ref so updating handler identities does NOT cause
 * the underlying EventSource to be torn down.
 *
 * Usage:
 *   const { connected, lastError } = useSSE({
 *     url: `/api/runs/${id}/stream`,
 *     withCredentials: true,
 *     events: {
 *       log:    (data) => append(data.line),
 *       phase:  (data) => setPhase(data.key),
 *     },
 *   })
 */
export interface UseSSEOptions {
    url: string;
    events?: Record<string, (data: unknown) => void>;
    withCredentials?: boolean;
}
export interface UseSSEResult {
    connected: boolean;
    lastError: Error | null;
}
export declare function useSSE(options: UseSSEOptions): UseSSEResult;
//# sourceMappingURL=sse-react.d.ts.map