import * as React from "react"; import type { AuthExpiryProviderProp } from "../../props/components/feedback.prop.js"; export type { AuthExpiryProviderProp, AuthExpiryProviderProp as AuthExpiryProviderProps, } from "../../props/components/feedback.prop.js"; /** * `"redirecting"` — the handler has been invoked (or is about to be); render a neutral pending state. * `"failed"` — the handler threw or rejected; fall back to the sign-in alert so the user is not left * on an endless spinner. */ export type AuthExpiryStatus = "redirecting" | "failed"; /** * Central handling for an expired session (401 / invalid or expired token) — the SSO norm: the app * sends the user back through the IdP, which returns immediately while the IdP session is alive, so * no page-level error is ever painted. * * Every `DataState`, `InfiniteQueryState`, `AlertMutationFeedback` and `AlertQueryError` under this * provider consults it. On an auth-class error it calls `onAuthExpired` **once** — any number of * simultaneous 401s share one call — and renders a neutral pending state with a polite live region * instead of an alert. The call is re-armed once every auth-errored view has gone (navigated away, * or the queries recovered after a silent refresh), so a later expiry fires again. */ export declare function AuthExpiryProvider({ onAuthExpired, children }: AuthExpiryProviderProp): React.JSX.Element; /** * Internal hook for the query surfaces. `active` = this view is currently showing an auth-class * error. Returns `null` when there is no provider (the caller keeps its legacy alert), otherwise the * status to render plus a `retry` for the fallback alert's sign-in button. */ export declare function useAuthExpiry(active: boolean, error: unknown): { status: AuthExpiryStatus; retry: () => void; } | null;