import type { SlashCommandActionId, SlashCommandSourceMeta, SlashCommandSummary } from './types'; interface SlashCommandSuggestionsProps { /** Filtered command list to render. Empty list → component renders null. */ commands: SlashCommandSummary[]; /** Index of the currently-highlighted suggestion (keyboard cursor or hover). */ highlightedIdx: number; /** Hover callback so keyboard + mouse stay in sync. */ onHover: (idx: number) => void; /** Click / Enter callback — the row's "default" action (clicking * anywhere on the row body, NOT one of the explicit action buttons). * The host typically maps this to "Search-mode pre-fill" (setValue * `/ ` with cursor at end). */ onSelect: (cmd: SlashCommandSummary) => void; /** Legacy `primarySourceId` → icon resolver. Used as a FALLBACK only * when `cmd.iconName` is missing. Newer command summaries carry * `iconName` directly and route through `resolveIcon` so * the dropdown row uses the same icon registry as the empty-state * onboarding cards. */ resolveSourceIcon?: (sourceId: string) => SlashCommandSourceMeta | undefined; /** Generic action handler — fires when the user clicks any of the * command's action buttons. The action's id discriminates the * dispatch behavior (browse / search / find / …); the host owns * the mapping. When undefined, NO action buttons render. */ onAction?: (cmd: SlashCommandSummary, actionId: SlashCommandActionId) => void; /** Optional className override for positioning (e.g. `absolute bottom-full`). */ className?: string; } /** * Slash-command autocomplete dropdown. * * Visually mirrors the empty-state onboarding list: each row is rendered * via `MingoOnboardingCard` (Figma node `7363:205939`) so the dropdown * and the empty-state share one card design. Rows are stacked inside a * `rounded-md` container whose `overflow-hidden` clips each card's * `border-b` divider into a clean 1-px frame. * * Icon resolution priority: * 1. `cmd.iconName` → `resolveIcon` (production path — * matches the keys returned by `/api/docs/commands`). * 2. `cmd.primarySourceId` → consumer-provided `resolveSourceIcon` * (legacy fallback for command feeds without `iconName`). * 3. `FileIcon` (default inside `resolveIcon`). * * Clicking the row body fires `onSelect` (the host typically maps this * to Search-mode pre-fill so the user can refine). Clicking an action * button fires `onAction(cmd, actionId)` — the card's action buttons * already `stopPropagation` so the row click doesn't double-fire. * * Accessibility: the outer container is `role="menu"`; each row is * `role="menuitem"` with `aria-current` for the highlighted row. The * menu (not listbox) is used because ARIA 1.2 forbids interactive * descendants inside `role="option"`, and our rows host inline action * buttons. */ export declare function SlashCommandSuggestions({ commands, highlightedIdx, onHover, onSelect, resolveSourceIcon, onAction, className, }: SlashCommandSuggestionsProps): import("react").JSX.Element | null; export {}; //# sourceMappingURL=slash-command-suggestions.d.ts.map