import * as React from 'react'; import { type LucideIcon } from 'lucide-react'; /** * The non-success states a query-backed surface (widget, list, panel) must * render. `success` is not a kind: render the data. * * - `loading` — first load, nothing to show yet. * - `empty` — the query worked and returned nothing. * - `error` — the query failed; offer `onRetry`. * - `forbidden` — the viewer lacks the permission (inline, not a full page). * - `offline` — no network; data cannot refresh. * - `stale` — showing data older than expected (pair with `description`). * - `partial` — some sources answered, some did not. * - `demo` — the data is illustrative, never a real measurement. */ export type DataStateKind = 'loading' | 'empty' | 'error' | 'forbidden' | 'offline' | 'stale' | 'partial' | 'demo'; export interface DataStateProps extends Omit, 'title'> { kind: DataStateKind; /** Main line. Defaults to `data_state.` (Spanish fallback). */ title?: React.ReactNode; /** Secondary line: what happened, since when, what is missing. */ description?: React.ReactNode; /** Shows a retry button (any kind; typical for `error`/`offline`/`stale`). */ onRetry?: () => void; /** Retry button label. Defaults to `data_state.retry` («Reintentar»). */ retryLabel?: string; /** Extra call to action (e.g. «Conectar fuente»). */ action?: React.ReactNode; /** Override the kind's icon. `null` hides it. */ icon?: LucideIcon | null; /** Inline one-row layout for cards, banners and table footers. */ compact?: boolean; } /** * One component for every non-success state, with consistent copy, icon and * semantics: `role="alert"` for errors, `role="status"` (polite live region) * for the rest; the loading spinner respects `prefers-reduced-motion`. Uses * theme tokens only (`muted-foreground`, `destructive`, `warning`), never fixed * colors, and never relies on color alone (icon + text). * * i18n keys (optional, with Spanish fallbacks): `data_state.loading`, * `data_state.empty`, `data_state.error`, `data_state.forbidden`, * `data_state.offline`, `data_state.stale`, `data_state.partial`, * `data_state.demo`, `data_state.retry`. */ export declare function DataState({ kind, title, description, onRetry, retryLabel, action, icon, compact, className, ...props }: DataStateProps): React.JSX.Element; //# sourceMappingURL=data-state.d.ts.map