import { ReactNode } from 'react'; /** A single, domain-free search result. Consumers build these from whatever * their API/hook returns — the package never fetches. */ export interface GlobalSearchItem { /** Stable key + focused-row identity. */ id: string; /** Primary text (ReactNode so a consumer can pre-format / pre-highlight). */ label: ReactNode; /** Optional group key (e.g. entity type / category). Absent → flat list. */ group?: string; /** Optional leading icon — a rendered element (consumer may derive it from a type). */ icon?: ReactNode; /** Optional trailing/secondary text. */ secondary?: ReactNode; /** Optional navigation target. Metadata only — does NOT replace `onSelect`. */ href?: string; /** When true the row is dimmed and not selectable (click or Enter). */ disabled?: boolean; /** Escape hatch: the original domain object, handed back via `onSelect`. */ data?: unknown; } export interface GlobalSearchProps { /** Flat, pre-fetched, pre-ordered results. Grouping is expressed via `item.group`. */ items: GlobalSearchItem[]; /** Single source of truth for selection — called on click and on Enter. */ onSelect: (item: GlobalSearchItem) => void; /** Controlled query value. The consumer owns fetching + debounce. */ value: string; onValueChange: (value: string) => void; /** Group key → header content. Omit for no group headers. */ getGroupLabel?: (group: string) => ReactNode; /** Fixed group ordering; groups not listed follow in insertion order. Omit → insertion order. */ groupOrder?: string[]; /** Single spinner at the bottom of the dropdown. */ isLoading?: boolean; /** Per-group spinner, keyed by group. */ groupLoading?: Record; /** Rendered when there are no items and `showEmpty` is true. */ emptyState?: ReactNode; showEmpty?: boolean; /** Optional footer row (e.g. a keyboard hint). */ footer?: ReactNode; /** When set, plain-string labels get their matching substring wrapped in ``. */ highlightQuery?: string; /** ArrowUp/Down wrap around (true) vs clamp at the ends (false, default). */ keyboardWrap?: boolean; /** Enable the ⌘K / Ctrl+K global focus shortcut (default true). */ enableGlobalShortcut?: boolean; placeholder?: string; inputSize?: "sm" | "md" | "lg"; /** Minimum dropdown width in px (default 400). */ dropdownMinWidth?: number; /** Gap in px between the input and the dropdown (default 4). */ gap?: number; className?: string; } export declare function GlobalSearch({ items, onSelect, value, onValueChange, getGroupLabel, groupOrder, isLoading, groupLoading, emptyState, showEmpty, footer, highlightQuery, keyboardWrap, enableGlobalShortcut, placeholder, inputSize, dropdownMinWidth, gap, className, }: GlobalSearchProps): import("react").JSX.Element; export declare namespace GlobalSearch { var displayName: string; } //# sourceMappingURL=GlobalSearch.d.ts.map