import { Formatting, Marks } from './../../rich-text-editor.types';
export interface NodeTypes {
    [Formatting.paragraph]: string;
    [Formatting.blockquote]: string;
    [Formatting.codeblock]: string;
    [Formatting.link]: string;
    [Formatting.ul]: string;
    [Formatting.ol]: string;
    [Formatting.li]: string;
    [Formatting.mention]: string;
    [Formatting.h3]: string;
    [Formatting.heading]: {
        1: string;
        2: string;
        3: string;
        4: string;
        5: string;
        6: string;
    };
    [Marks.emphasis]: string;
    [Marks.strong]: string;
    [Marks.delete]: string;
    [Marks.code]: string;
    [Formatting.hr]: string;
    [Formatting.image]: string;
}
export declare enum MdastNodes {
    paragraph = "paragraph",
    heading = "heading",
    list = "list",
    listItem = "listItem",
    link = "link",
    mention = "mention",
    image = "image",
    blockquote = "blockquote",
    code = "code",
    html = "html",
    emphasis = "emphasis",
    strong = "strong",
    delete = "delete",
    inlineCode = "inlineCode",
    thematicBreak = "thematicBreak",
    text = "text",
    h3 = "heading_three"
}
export type MdastNodeType = MdastNodes.paragraph | MdastNodes.heading | MdastNodes.list | MdastNodes.listItem | MdastNodes.link | MdastNodes.mention | MdastNodes.image | MdastNodes.blockquote | MdastNodes.code | MdastNodes.html | MdastNodes.emphasis | MdastNodes.strong | MdastNodes.delete | MdastNodes.inlineCode | MdastNodes.thematicBreak | MdastNodes.text | MdastNodes.h3;
export declare const defaultNodeTypes: NodeTypes;
export interface LeafType {
    text: string;
    [Formatting.strikethrough]?: boolean;
    [Formatting.bold]?: boolean;
    [Formatting.italic]?: boolean;
    [Formatting.code]?: boolean;
    [Formatting.h3]?: boolean;
    parentType?: string;
}
export interface BlockType {
    type: string;
    parentType?: string;
    link?: string;
    mention?: string;
    caption?: string;
    language?: string;
    break?: boolean;
    children: Array<BlockType | LeafType>;
}
export interface InputNodeTypes {
    [Formatting.paragraph]: string;
    [Formatting.blockquote]: string;
    [Formatting.codeblock]: string;
    [Formatting.link]: string;
    [Formatting.ul]: string;
    [Formatting.ol]: string;
    [Formatting.li]: string;
    [Formatting.heading]: {
        1: string;
        2: string;
        3: string;
        4: string;
        5: string;
        6: string;
    };
    [Marks.emphasis]: string;
    [Marks.strong]: string;
    [Marks.delete]: string;
    [Marks.code]: string;
    [Formatting.hr]: string;
    [Formatting.image]: string;
    [Formatting.h3]: string;
}
type RecursivePartial<T> = {
    [P in keyof T]?: RecursivePartial<T[P]>;
};
export interface OptionType<T extends InputNodeTypes = InputNodeTypes> {
    nodeTypes?: RecursivePartial<T>;
    linkDestinationKey?: string;
    imageSourceKey?: string;
    imageCaptionKey?: string;
}
export interface MdastNode {
    type?: MdastNodeType;
    ordered?: boolean;
    value?: string;
    text?: string;
    children?: Array<MdastNode>;
    depth?: 1 | 2 | 3 | 4 | 5 | 6;
    url?: string;
    alt?: string;
    lang?: string;
    position?: any;
    spread?: any;
    checked?: any;
    indent?: any;
}
export type TextNode = {
    text?: string | undefined;
};
export type CodeBlockNode<T extends InputNodeTypes> = {
    type: T[Formatting.codeblock];
    language: string | undefined;
    children: Array<TextNode>;
};
export type HeadingNode<T extends InputNodeTypes> = {
    type: T[Formatting.heading][1] | T[Formatting.heading][2] | T[Formatting.heading][3] | T[Formatting.heading][4] | T[Formatting.heading][5] | T[Formatting.heading][6];
    children: Array<DeserializedNode<T>>;
};
export type ListNode<T extends InputNodeTypes> = {
    type: T[Formatting.ol] | T[Formatting.ul];
    children: Array<DeserializedNode<T>>;
};
export type ListItemNode<T extends InputNodeTypes> = {
    type: T[Formatting.li];
    children: Array<DeserializedNode<T>>;
};
export type ParagraphNode<T extends InputNodeTypes> = {
    type: T[Formatting.paragraph];
    break?: true;
    children: Array<DeserializedNode<T>>;
};
export type LinkNode<T extends InputNodeTypes> = {
    type: T[Formatting.link];
    children: Array<DeserializedNode<T>>;
    [urlKey: string]: string | undefined | Array<DeserializedNode<T>>;
};
export type ImageNode<T extends InputNodeTypes> = {
    type: T[Formatting.image];
    children: Array<DeserializedNode<T>>;
    [sourceOrCaptionKey: string]: string | undefined | Array<DeserializedNode<T>>;
};
export type BlockQuoteNode<T extends InputNodeTypes> = {
    type: T[Formatting.blockquote];
    children: Array<DeserializedNode<T>>;
};
export type InlineCodeMarkNode<T extends InputNodeTypes> = {
    type: T[Marks.code];
    children: Array<TextNode>;
    language: string | undefined;
};
export type ThematicBreakNode<T extends InputNodeTypes> = {
    type: T[Formatting.hr];
    children: Array<DeserializedNode<T>>;
};
export type ItalicNode<T extends InputNodeTypes> = {
    [K in T[Marks.emphasis]]: true;
} & {
    children: TextNode;
};
export type BoldNode = {
    [Formatting.bold]: true;
    children: TextNode;
};
export type StrikeThoughNode = {
    [Formatting.strikethrough]: true;
    children: TextNode;
};
export type InlineCodeNode = {
    [Formatting.code]: true;
    text: string | undefined;
};
export type DeserializedNode<T extends InputNodeTypes> = CodeBlockNode<T> | HeadingNode<T> | ListNode<T> | ListItemNode<T> | ParagraphNode<T> | LinkNode<T> | ImageNode<T> | BlockQuoteNode<T> | InlineCodeMarkNode<T> | ThematicBreakNode<T> | ItalicNode<T> | BoldNode | StrikeThoughNode | InlineCodeNode | TextNode;
export {};
