import { ContextKey, Keybinding } from './definitions';
import * as _ from 'lodash';
import { BaseObserver } from '@journeyapps-labs/common-utils';
export interface ResolvedKeybindingItem {
    command: string;
    keybinding: Keybinding;
    when: ContextKey;
}
export interface CommandBindingsListener {
    updated: () => any;
}
export declare abstract class CommandBindings extends BaseObserver<CommandBindingsListener> {
    protected custom: Keybinding[];
    constructor();
    updated(): void;
    abstract serialize(): ResolvedKeybindingItem[];
    abstract getDefaults(): Keybinding[];
    addKeybinding(binding: Keybinding): void;
    deleteKeybinding(binding: Keybinding): void;
}
export declare class CustomCommandBindings extends CommandBindings {
    protected command: string;
    constructor(command: string);
    serialize(): ResolvedKeybindingItem[];
    getDefaults(): Keybinding[];
}
export declare class ExistingCommandBindings extends CommandBindings {
    protected command: string;
    defaults: ResolvedKeybindingItem[];
    touched: boolean;
    constructor(command: string, defaults: ResolvedKeybindingItem[]);
    addKeybinding(binding: Keybinding): void;
    deleteKeybinding(binding: Keybinding): void;
    serialize(): ResolvedKeybindingItem[];
    getDefaults(): Keybinding[];
}
export interface KeybindingsRegistryListener {
    saved: () => any;
}
export declare class KeybindingsRegistry extends BaseObserver<KeybindingsRegistryListener> {
    map: Map<string, CommandBindings>;
    constructor();
    getCommandKeybinding(id: string): CommandBindings;
    load(): void;
    save: _.DebouncedFunc<() => void>;
}
