import { TypedEmitter } from 'tiny-typed-emitter';
import { AbstractManualCommandBar, AbstractCommandBar, CommandBarEvents, CommandBarOptions, CommandItemElement, CreateManualCommandBarFunction, ManualShowCommandBarOptions, CloseReason, Closeable, CommandItem } from '../types';
import 'tippy.js/dist/tippy.css';
export default abstract class CommandBar extends TypedEmitter<CommandBarEvents> implements AbstractCommandBar {
    content: HTMLElement;
    items: CommandItem[];
    subBar: AbstractManualCommandBar | null;
    parentItem: CommandItem | null;
    closeable: Closeable | null;
    options: CommandBarOptions;
    id: string;
    private header;
    private footer;
    constructor(items: CommandItem[], closeable?: Closeable, options?: CommandBarOptions);
    close(reason: CloseReason): void;
    requestClose(reason: CloseReason): void;
    click(item: CommandItem, target: HTMLElement): void;
    createPopperOptions(): Partial<import("@popperjs/core").Options>;
    destroy(): void;
    abstract readonly isVisible: boolean;
    get isSubCommandBar(): boolean;
    updateItems(items: CommandItem[]): void;
    updateItem(item: CommandItem, options?: {
        statesOnly?: boolean;
    }): void;
    handleDocumentKeydown: (event: KeyboardEvent) => boolean;
    protected handleWindowMouseDown: (event: MouseEvent) => void;
    protected handleHidden: () => void;
    protected handleShow: () => void;
    get popper(): Element | null;
    findTargetItem(event: MouseEvent): CommandItem | null | undefined;
    protected getSelectedItemIndex(): number;
    protected getPrevItemIndex(curr: number): number;
    protected getNextItemIndex(curr: number): number;
    protected clearSelectedItem(): void;
    selectItem(id: string): void;
    private lastEnterPauseTime;
    private startPauseMouseEnter;
    private handleItemMouseEnter;
    private handleItemMouseLeave;
    protected handleItemClick: (event: MouseEvent) => void;
    protected showSubCommandBar(subMenuId?: string): void;
    isInCommandBar(target: EventTarget | null): boolean;
    createCommandItem(item: CommandItem): CommandItemElement;
    getItemById(id: string): CommandItem;
    getSelectedItem(): CommandItem | null;
    protected getItemElementId(elem: CommandItemElement): string;
    getItemElementById(id: string): CommandItemElement;
    findItemElementById(id: string): CommandItemElement | null;
    protected getParentCommandItemElement(target: EventTarget | null): CommandItemElement | null;
    protected createCommandBarContent(items: CommandItem[]): HTMLElement;
    handleWheel: (e: WheelEvent) => void;
    getSubBarOptions(item: CommandItem, target: HTMLElement): ManualShowCommandBarOptions;
    protected abstract initCommandBarElement(elem: HTMLElement): void;
    protected abstract initItemElement(item: CommandItem, elem: CommandItemElement): void;
    protected abstract getCommandBarRoot(): HTMLElement | null;
    static commandBarCreators: Map<string, CreateManualCommandBarFunction>;
    static registerManualCommandBar(type: string, creator: CreateManualCommandBarFunction): void;
    static createSubCommandBar(item: CommandItem, closeable: Closeable, options?: CommandBarOptions): AbstractManualCommandBar;
    static hasExistsCommandBar(): boolean;
}
