import { CSSProperties, ReactNode } from 'react'; import { SlotClassNames, SlotStyles, HtmlProps } from '../types/slots.types.js'; export type LoadingOverlaySlots = 'content' | 'backdrop' | 'panel' | 'message'; export interface LoadingOverlayProps extends HtmlProps { /** Covers the content, blocks the pointer and marks it `aria-busy`. Defaults to `false`. */ isLoading?: boolean; /** What the overlay covers. */ children?: ReactNode; /** Shown in place of the default `Loader`: a `Loader` of another type, an `AnimatedLogo`, anything. */ loader?: ReactNode; /** Text under the loader, with a highlight sweeping across it. Also the default loader's accessible name. */ message?: ReactNode; /** Milliseconds `isLoading` has to stay true before the overlay shows, so a fast load never flashes it. Once shown, it stays at least 400ms. Defaults to `200`. */ delay?: number; className?: string; style?: CSSProperties; /** Classes for the inner elements. See `LoadingOverlaySlots`. */ classNames?: SlotClassNames; /** Inline styles for the inner elements. See `LoadingOverlaySlots`. */ styles?: SlotStyles; }