import { EditorState } from '../editor/vendor/prosemirrorState.js';
import { Editor } from '@tiptap/react';
export declare const BEDITOR_TABLE_GRID_SIZE = 10;
type TBEditorToolbarAlign = 'center' | 'justify' | 'left' | 'right';
export type TBEditorToolbarHeader = 0 | 1 | 2 | 3 | 4 | 5 | 6;
export type TBEditorToolbarPicker = 'align' | 'background' | 'color' | 'header' | 'table';
export interface IBEditorToolbarState {
    align: TBEditorToolbarAlign;
    background: string;
    blockquote: boolean;
    bold: boolean;
    bulletList: boolean;
    color: string;
    header: TBEditorToolbarHeader;
    italic: boolean;
    link: boolean;
    orderedList: boolean;
    strike: boolean;
    underline: boolean;
}
interface IBEditorToolbarStateView {
    dom: HTMLElement;
}
type TBEditorToolbarStateReader = Pick<Editor, 'isActive'> & Partial<Pick<Editor, 'getAttributes' | 'isFocused' | 'isInitialized'>> & {
    state?: EditorState;
    view?: IBEditorToolbarStateView;
};
export interface IBEditorToolbarTextSelection {
    from: number;
    to: number;
}
interface IBEditorToolbarCommandChain {
    focus: () => IBEditorToolbarCommandChain;
    run: () => boolean;
    setTextSelection: (range: IBEditorToolbarTextSelection) => IBEditorToolbarCommandChain;
}
interface IBEditorToolbarCommandEditor<TChain extends IBEditorToolbarCommandChain> {
    chain: () => TChain;
    commands?: {
        setTextSelection: (range: IBEditorToolbarTextSelection) => boolean;
    };
    state: IBEditorToolbarSelectionEditor['state'];
    view?: IBEditorToolbarSelectionEditor['view'];
}
export interface IBEditorToolbarSelectionEditor {
    state: {
        selection: IBEditorToolbarTextSelection;
    };
    view?: {
        dom: HTMLElement;
        posAtDOM: (node: Node, offset: number) => number;
    };
}
export declare function resolveBEditorToolbarState(editor: TBEditorToolbarStateReader | null | undefined): IBEditorToolbarState;
export declare function areBEditorToolbarStatesEqual(current: IBEditorToolbarState, next: IBEditorToolbarState | null): boolean;
export declare function runBEditorToolbarTextCommand<TChain extends IBEditorToolbarCommandChain>(editor: IBEditorToolbarCommandEditor<TChain>, command: (chain: TChain) => IBEditorToolbarCommandChain): boolean;
export declare function resolveBEditorToolbarCommandSelection(editor: IBEditorToolbarSelectionEditor): IBEditorToolbarTextSelection;
export declare function clearBEditorToolbarSelectionMemory(editor: object | null | undefined): void;
export declare function rememberBEditorToolbarCommandSelection(editor: IBEditorToolbarSelectionEditor & object): IBEditorToolbarTextSelection;
export declare function resolveBEditorToolbarCommandSelectionWithMemory(editor: IBEditorToolbarSelectionEditor & object): IBEditorToolbarTextSelection;
export declare function resolveBEditorToolbarPickerToggle(currentPicker: TBEditorToolbarPicker | null, nextPicker: TBEditorToolbarPicker): TBEditorToolbarPicker | null;
export {};
