import { type ComponentProps, type ReactNode, type RefObject } from 'react';
/**
* Unstyled Carbon `Loading`, the behaviour of the styled one without a single class. It shows while
* `active`, after `delay` ms, and once shown stays at least `minDuration` ms (core/spin-delay), so
* quick work never flashes a spinner. `Spinner` wraps your spinner graphic: an assertive live
* region while shown. `Indicator` is what holds focus while it shows, named by its `aria-label`:
* with `modal` (a page overlay) it is a modal dialog that keeps focus — Tab and focus moving
* elsewhere come back to it; dialogs layered above are left alone — and focus goes back where it
* was afterwards. Around an `Area` (a contained loading) it is a group: the area is inert and
* busy while shown, and focus that was inside it waits on the `Indicator`, then goes back.
*
* State shows as `data-shown` on `Area`, `Indicator` and `Spinner`; `useLoadingContext().shown`.
*
* ```tsx
*
* …the form…
* …svg…
*
* ```
*/
export interface RootProps {
/** On by default; false stops and hides it. */
active?: boolean;
/** Milliseconds `active` must last before it shows (default 0, as Carbon). */
delay?: number;
/** Once shown, the least milliseconds it stays (default 0). */
minDuration?: number;
/** A page overlay: the `Indicator` is a modal dialog that holds focus while shown. */
modal?: boolean;
children?: ReactNode;
}
interface LoadingContextValue {
/** Active, after the delay, held for the minimum duration. */
shown: boolean;
modal: boolean;
area: RefObject;
indicator: RefObject;
}
/** The state of the enclosing `Loading.Root` (`shown`, `modal`). */
export declare function useLoadingContext(part?: string): LoadingContextValue;
/** Holds whether it shows and moves focus while it does; renders only its children. */
export declare function Root({ active, delay, minDuration, modal, children }: Readonly): import("react").JSX.Element;
/** The content a contained loading covers: inert and busy while shown. */
export declare function Area({ ref, ...rest }: Readonly>): import("react").JSX.Element;
/**
* What holds focus while it shows, named by its `aria-label`: a modal dialog with `modal`, else a
* group. Not a `