import type { CompilerService } from "./compiler.js"; import type { CommandCatalogService } from "./command-catalog.js"; import type { ConditionService } from "./conditions.js"; import type { ActivationService } from "./activation.js"; import type { Binding, BindingState, KeymapEvent, KeymapHost, Layer, ResolvedKeyToken, CommandState } from "../types.js"; import type { State } from "./state.js"; import type { NotificationService } from "./notify.js"; interface LayersOptions { compiler: CompilerService; commands: CommandCatalogService; host: KeymapHost; diagnostics?: LayerDiagnostics; warnUnknownField: (kind: "binding" | "layer", fieldName: string) => void; } export interface AnalyzeLayerOptions { target?: TTarget; order: number; commands: readonly CommandState[]; sourceBindings: readonly Binding[]; bindings: readonly BindingState[]; hasTokenBindings: boolean; } export interface LayerDiagnostics { analyzeLayer(options: AnalyzeLayerOptions): void; } export interface LayerService { registerLayer(layer: Layer): () => void; applyTokenState(nextTokens: Map): void; recompileBindings(): void; cleanup(): void; } export declare function createLayerService(state: State, notify: NotificationService, conditions: ConditionService, activation: ActivationService, options: LayersOptions): LayerService; export {};