import type { CompilerService } from "./compiler.js"; import type { RuntimeEmitter } from "../lib/runtime-utils.js"; import type { ActivationService } from "./activation.js"; import type { CommandExecutorService } from "./command-executor.js"; import type { CommandCatalogService } from "./command-catalog.js"; import type { ConditionService } from "./conditions.js"; import type { LayerService } from "./layers.js"; import type { NotificationService } from "./notify.js"; import type { RuntimeService } from "./runtime.js"; import type { State } from "./state.js"; import { type EventMatchResolver, type KeyDisambiguationResolver, type KeyInterceptOptions, type KeyAfterInputContext, type KeyInputContext, type KeymapEvent, type PendingSequenceState, type RawInterceptOptions, type RawInputContext, type Hooks } from "../types.js"; export interface DispatchService { intercept(name: "key", fn: (ctx: KeyInputContext) => void, options?: KeyInterceptOptions): () => void; intercept(name: "key:after", fn: (ctx: KeyAfterInputContext) => void, options?: KeyInterceptOptions): () => void; intercept(name: "raw", fn: (ctx: RawInputContext) => void, options?: RawInterceptOptions): () => void; prependEventMatchResolver(resolver: EventMatchResolver): () => void; appendEventMatchResolver(resolver: EventMatchResolver): () => void; clearEventMatchResolvers(): void; prependDisambiguationResolver(resolver: KeyDisambiguationResolver): () => void; appendDisambiguationResolver(resolver: KeyDisambiguationResolver): () => void; clearDisambiguationResolvers(): void; handlePendingSequenceChange(previous: PendingSequenceState | null, next: PendingSequenceState | null): void; handleRawSequence(sequence: string): boolean; handleKeyEvent(event: TEvent, release: boolean): void; } export declare function createDispatchService(state: State, notify: NotificationService, runtime: RuntimeService, activation: ActivationService, conditions: ConditionService, executor: CommandExecutorService, compiler: CompilerService, catalog: CommandCatalogService, layers: LayerService, hooks: RuntimeEmitter>): DispatchService;