import { ReactNode } from 'react'; import { LucideIcon } from 'lucide-react'; export type StateBlockState = "loading" | "error" | "empty" | "success"; export interface StateBlockProps { /** Precedence: loading > error > empty > success. */ isLoading?: boolean; isError?: boolean; /** True when the query resolved but has no rows (e.g. `data.length === 0`). */ isEmpty?: boolean; /** Explicit override; when set, wins over the boolean flags. */ status?: StateBlockState; /** "skeleton" (default) renders `skeletonRows` lines; "spinner" centers a Spinner. */ loadingVariant?: "skeleton" | "spinner"; /** Skeleton line count. Default 4. */ skeletonRows?: number; /** Fully custom loading node — overrides `loadingVariant`. */ loadingFallback?: ReactNode; error?: string | Error | null; /** * Retry action for the error state. `label` is caller-supplied (visible text * AND accessible name) — mirrors `emptyAction` / `EmptyState.action`. Omit for * no retry button. StateBlock stays i18n-free; the consumer localizes `label`. */ retryAction?: { label: ReactNode; onClick: () => void; }; /** "block" (default, centered icon+text+retry) | "alert" (Alert bar). */ errorVariant?: "block" | "alert"; /** Icon for the "block" error variant. Default AlertCircle. */ errorIcon?: LucideIcon; emptyIcon?: LucideIcon; emptyTitle?: string; emptyDescription?: string; emptyAction?: { label: string; onClick: () => void; }; emptySize?: "default" | "compact"; children?: ReactNode; className?: string; } /** * Presentational loading / error / empty / success switch — composes the * existing `Skeleton`/`Spinner`/`EmptyState`/`Alert` parts. Prop-driven (booleans * in), no data fetching or i18n baked in, matching the ui-kit molecule tier. * Precedence: loading > error > empty > success. */ export declare function StateBlock({ loadingVariant, skeletonRows, loadingFallback, error, retryAction, errorVariant, errorIcon: ErrorIcon, emptyIcon, emptyTitle, emptyDescription, emptyAction, emptySize, children, className, ...flags }: StateBlockProps): import("react").JSX.Element; //# sourceMappingURL=StateBlock.d.ts.map