import type { ActiveBinding, Attributes, Command, CommandEntry, CommandBindingsQuery, CommandResolutionStatus, CommandQuery, CommandResolver, BindingState, KeymapEvent, KeymapHost, CommandState } from "../types.js"; import type { ConditionService } from "./conditions.js"; import type { NotificationService } from "./notify.js"; import type { ActiveCommandView, ResolvedCommandEntry, State } from "./state.js"; interface CommandCatalogOptions { onCommandResolversChanged(): void; } interface ResolvedCommandLookup { resolved?: ResolvedCommandEntry; hadError: boolean; } interface CommandExecutionFields { input: string; payload?: unknown; } export interface CommandCatalogService { normalizeCommands(commands: readonly Command[]): CommandState[]; prependCommandResolver(resolver: CommandResolver): () => void; appendCommandResolver(resolver: CommandResolver): () => void; clearCommandResolvers(): void; getCommands(query?: CommandQuery): readonly Command[]; getCommandEntries(query?: CommandQuery): readonly CommandEntry[]; getCommandBindings(query: CommandBindingsQuery): ReadonlyMap[]>; getResolvedCommandChain(command: string, focused: TTarget | null, execution?: CommandExecutionFields): { entries?: readonly ResolvedCommandEntry[]; hadError: boolean; }; getRegisteredResolvedEntries(command: string): readonly ResolvedCommandEntry[] | undefined; getActiveRegisteredResolvedEntries(command: string, focused: TTarget | null): readonly ResolvedCommandEntry[] | undefined; resolveRegisteredResolverFallback(command: string, execution?: CommandExecutionFields): ResolvedCommandLookup; resolveActiveResolverFallback(command: string, focused: TTarget | null, execution?: CommandExecutionFields): ResolvedCommandLookup; getTopCommand(command: string, focused: TTarget | null): Command | undefined; getDispatchUnavailableCommandState(command: string, focused: TTarget | null, includeCommand: boolean): { reason: "inactive" | "disabled"; command?: Command; } | undefined; getActiveCommandView(focused: TTarget | null): ActiveCommandView; isBindingVisible(binding: BindingState, focused: TTarget | null, activeView: ActiveCommandView): boolean; getBindingCommandAttrs(binding: BindingState, focused: TTarget | null, activeView: ActiveCommandView): Readonly | undefined; getCommandResolutionStatus(command: string, layerCommands?: readonly CommandState[]): CommandResolutionStatus; } export declare function createCommandCatalogService(state: State, host: KeymapHost, notify: NotificationService, conditions: ConditionService, options: CommandCatalogOptions): CommandCatalogService; export declare function getCommand(state: CommandState): Command; export {};