import ArenaFormating, { ArenaFormatings } from '../interfaces/ArenaFormating';
import Intervaler from './Intervaler';
import InlineIntervaler from './InlineIntervaler';
import { ArenaInlineInterface } from '../interfaces/Arena';
import { ArenaNodeInline } from '../interfaces/ArenaNode';
export declare type Formatings = {
    [name: string]: Intervaler;
};
declare type Insertion = {
    tag: string;
    offset: number;
};
declare type FNode = {
    name: string;
    openTag?: string;
    closeTag?: string;
    start: number;
    end: number;
    children: FNode[];
};
export default class RichTextManager {
    constructor(text?: string, formatings?: Formatings, inlines?: InlineIntervaler);
    getText(): string;
    setText(text: string): void;
    getTextLength(): number;
    getFormatings(): Formatings;
    getHtml(frms: ArenaFormatings, start?: number, end?: number): string;
    insertText(rtm: string | RichTextManager, offset?: number, keepFormatings?: boolean): number;
    removeText(start: number, end?: number): void;
    clearText(): void;
    cutText(start: number, end?: number): RichTextManager;
    insertFormating(name: string, start: number, end: number): void;
    togglePromiseFormating(formating: ArenaFormating, offset: number): void;
    clearPromises(): void;
    toggleFormating(name: string, start: number, end: number): void;
    clearFormatings(start: number, end: number): void;
    hasFormating(name: string, start?: number, end?: number): boolean;
    ltrim(): void;
    rtrim(): void;
    clearSpaces(): void;
    addInlineNode(arena: ArenaInlineInterface, start: number, end: number): ArenaNodeInline | undefined;
    getInlineNode(arena: ArenaInlineInterface, start: number, end: number): ArenaNodeInline | undefined;
    removeInlineNode(node: ArenaNodeInline): void;
    updateInlineNode(node: ArenaNodeInline, start: number, end: number): void;
    clone(): RichTextManager;
    protected inlines: InlineIntervaler;
    protected formatings: Formatings;
    protected text: string;
    protected promises: {
        [name: string]: {
            offset: number;
            type: 'add' | 'remove';
        };
    };
    protected cutFormatings(start: number, end?: number): Formatings;
    protected prepareText(text: string, first: boolean, last: boolean): string;
    protected getInsertions(frms: ArenaFormatings): Insertion[];
    protected shiftFormatings(offset: number, step: number): void;
    protected merge(formatings: RichTextManager, offset: number): void;
    protected getHtmlTree(frms: ArenaFormatings, globalStart: number, globalEnd: number): FNode[];
    protected getHtmlFromTree(nodes: FNode[], prepareSpace?: boolean): [string, boolean];
    protected getFormationgsForApply(offset: number): string[];
}
export {};
//# sourceMappingURL=RichTextManager.d.ts.map