import { Editor } from '@tiptap/core';
import { Node as ProseMirrorNode } from '@tiptap/pm/model';
import { EditorState, Plugin, PluginKey, Transaction } from '@tiptap/pm/state';
import { DecorationSet } from '@tiptap/pm/view';

export declare const DBLOCK_HIDDEN_CLASS = "d-block-hidden";
export interface HeadingLookup {
    id: string;
    level: number;
    position: number;
    children: string[];
    parent?: string;
}
export type HeadingLookupMap = Map<string, HeadingLookup>;
export interface DBlockRenderMeta {
    isHeading: boolean;
    headingId: string | null;
    isThisHeadingCollapsed: boolean;
    headingAlignment?: string;
    isTable: boolean;
}
interface DBlockCollapsePluginState {
    decorations: DecorationSet;
    structureSignature: string;
}
export declare const getDBlockRenderMeta: (node: ProseMirrorNode, pos: number) => DBlockRenderMeta;
export declare const getHeadingAlignmentClass: (alignment?: string) => "justify-center" | "justify-end" | "justify-start";
export declare const getHeadingLinkSlug: (node: ProseMirrorNode, pos: number) => string | null;
export declare const buildHeadingMap: (doc: ProseMirrorNode) => HeadingLookupMap;
export declare const shouldHideDBlock: (doc: ProseMirrorNode, node: ProseMirrorNode, position: number, headingMap: HeadingLookupMap) => boolean;
export declare const findEndOfCollapsedContent: (doc: ProseMirrorNode, headingPos: number) => number;
export declare const buildToggleHeadingCollapseTransaction: (state: EditorState, position: number) => Transaction | null;
export declare const toggleHeadingCollapse: (editor: Editor, position: number) => boolean;
export declare const expandHeadingContent: (editor: Editor, nodePos: number) => boolean;
export declare const dBlockCollapsePluginKey: PluginKey<DBlockCollapsePluginState>;
export declare const createDBlockCollapsePlugin: () => Plugin<DBlockCollapsePluginState>;
export {};
