/** * `ViewToggle` + `useViewMode` — the list/card switch every entity screen shares. * * The control is a `RadioGroup variant="segmented"` with ICON-ONLY options: each * option's text label is rendered for assistive tech only (`visuallyHiddenLabel`), * so the segment shows just its glyph while keeping a real accessible name. A single * screen's choice persists across sessions in `localStorage`, keyed per SURFACE — * the tools screen and the flows page each remember their own view — via * {@link useViewMode}. The two live in the SDK so every entity screen (and the * flows page) toggles identically; `EntityCardGrid` renders the card half. */ import { type ReactNode } from 'react'; /** The two entity-screen layouts. */ export type ViewMode = 'list' | 'cards'; export interface ViewToggleProps { readonly value: ViewMode; readonly onValueChange: (mode: ViewMode) => void; /** The control's accessible group name (e.g. "Tools view"). */ readonly 'aria-label': string; readonly disabled?: boolean; } /** The icon-only segmented switch. Controlled: pair it with {@link useViewMode}. */ export declare function ViewToggle({ value, onValueChange, 'aria-label': ariaLabel, disabled, }: ViewToggleProps): ReactNode; /** * The persisted view mode for one `surface` (a stable key like `'tools'`). Returns * the stored choice or `fallback` when none is set, and a setter that writes through * to `localStorage`. Storage failures degrade to in-memory only — never a thrown * boot, matching the theme preference's defensive reads/writes. */ export declare function useViewMode(surface: string, fallback?: ViewMode): readonly [ViewMode, (mode: ViewMode) => void]; //# sourceMappingURL=view-toggle.d.ts.map