/** * `` — the dropdown UI subcomponent of FormCacheSelector. * * Architecture §9.8 / UX §5.2 States 3-5 / §5.3 Component Composition. * * Composition: * - shadcn `Popover` (D-UX-001 — Kit has no combobox primitive). * - shadcn `Command` for accessible keyboard navigation + free-text search. * - lucide-react `Check` and `ChevronDown` icons. * * Behavior: * - "Sin filtros" pseudo-option always appears first (FR-FFCS-012). Its * `value` is the reserved sentinel `__no_filter__` (R-002) — a string that * can never collide with a user-chosen cache name. * - Named caches are sorted alphabetically (case-insensitive, locale-aware) * via `sortCaches`. * - The active item shows a `Check` icon as prefix; inactive items reserve * equivalent left padding so layout stays aligned. * - `aria-expanded` on the trigger button (AC-009). * - `aria-selected` on each `CommandItem` (AC-010). * * The actual side effects (GetById, safeParse, onSelected, UpdateLastInUse) * live in the parent hook's `handleSelectCache` / `handleSelectNoFilter` — * this component is a pure UI shell that forwards user clicks. */ import type { FormCacheDTO } from '../FormCacheSelector.types'; export interface CacheSelectorProps { /** Caches to display in the dropdown — already deduplicated by the hook. */ caches: FormCacheDTO[]; /** Currently-selected cache id, or `null` when "Sin filtros" is active. */ activeId: string | null; /** Click handler for a named cache item. May reject; errors are swallowed. */ onSelectCache: (cache: FormCacheDTO) => Promise; /** Click handler for the "Sin filtros" pseudo-option. */ onSelectNoFilter: () => void; /** Localized label for the "Sin filtros" pseudo-option. */ noFilterLabel: string; } export declare function CacheSelector({ caches, activeId, onSelectCache, onSelectNoFilter, noFilterLabel, }: CacheSelectorProps): import("react/jsx-runtime").JSX.Element; //# sourceMappingURL=CacheSelector.d.ts.map