import { type AnimationEventHandler } from 'react'; /** * Event handlers for the field surface that shows the shimmer. * @internal */ export interface AsyncLoadingSurfaceHandlers { /** * Picks up the sweep of the surface and times it from the surface width. */ onAnimationStart: AnimationEventHandler; /** * Detects when the last sweep has finished and applies width changes. */ onAnimationIteration: AnimationEventHandler; } /** * Props for the field surface that shows the shimmer. * @internal */ export interface AsyncLoadingSurface { /** * Class name for the field surface, `undefined` when no shimmer is shown. */ className: string | undefined; /** * Event handlers for the field surface, stable across renders. */ handlers: AsyncLoadingSurfaceHandlers; } /** * Return value of `useAsyncLoading`. * @internal */ export interface AsyncLoading { /** * Starts or stops the shimmer. Stopping lets the running sweep finish first. */ setPendingIndicator: (visible: boolean) => void; /** * Props for the field surface. */ surface: AsyncLoadingSurface; } /** * Controls the async loading shimmer of a field surface. * @internal */ export declare function useAsyncLoading(): AsyncLoading; //# sourceMappingURL=useAsyncLoading.d.ts.map