import type { Match } from 'linkify-it';
import type MarkdownIt from 'markdown-it';
import type Token from 'markdown-it/lib/token';
import { Mark, type Node, type NodeType, type Schema } from 'prosemirror-model';
import { type Logger2 } from "../../logger.js";
import type { Parser, ParserToken } from "../types/parser.js";
import { type TransformFn } from "./ProseMirrorTransformer/index.js";
export type TokenAttrs = {
    [name: string]: unknown;
};
type MarkdownParserOptions = {
    logger: Logger2.ILogger;
    pmTransformers: TransformFn[];
    dynamicModifier?: MarkdownParserDynamicModifier;
};
export declare class MarkdownParser implements Parser {
    schema: Schema;
    stack: Array<{
        type: NodeType;
        attrs?: TokenAttrs;
        content: Array<Node>;
    }>;
    marks: readonly Mark[];
    tokens: Record<string, ParserToken>;
    tokenizer: MarkdownIt;
    pmTransformers: TransformFn[];
    dynamicModifier: MarkdownParserDynamicModifier | null;
    private logger;
    constructor(schema: Schema, tokenizer: MarkdownIt, tokens: Record<string, ParserToken>, opts: MarkdownParserOptions);
    validateLink(url: string): boolean;
    normalizeLink(url: string): string;
    normalizeLinkText(url: string): string;
    matchLinks(text: string): Readonly<Match>[] | null;
    parse(text: string): Node;
    private top;
    private push;
    private getTokenAttrs;
    private getTokenSpec;
    private getTokenType;
    private handlePrimitiveToken;
    private handleMark;
    private getNodeSchema;
    private handleNode;
    private handleBlock;
    private handleToken;
    private addNode;
    private openNode;
    private closeNode;
    private addText;
    private openMark;
    private closeMark;
    private parseTokens;
}
export type ProcessNodeAttrs = (token: Token, attrs: TokenAttrs, allowedAttrs?: string[]) => TokenAttrs;
export type ProcessNode = (node: Node) => Node;
export {};
