/**
 * This Source Code is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
 *
 * Copyright (c) Infonomic Company Limited
 */
export interface LexicalToMarkdownWarning {
    kind: 'unknown-node' | 'unresolved-link' | 'empty-table';
    detail: string;
}
export interface LexicalToMarkdownOptions {
    /**
     * Resolve an internal-link / inline-image relation to a public URL.
     * Receives the node's flattened relation attributes (`targetCollectionPath`,
     * `document.path`, …). Return `undefined` to fall back to the default
     * `/${targetCollectionPath}/${document.path}` composition; the link is
     * dropped (children kept) when no URL can be derived at all.
     */
    resolveInternalUrl?: (attrs: {
        targetDocumentId?: string;
        targetCollectionPath?: string;
        documentPath?: string;
    }) => string | undefined;
}
export interface LexicalToMarkdownResult {
    markdown: string;
    warnings: LexicalToMarkdownWarning[];
}
/**
 * Serialize a stored Lexical `SerializedEditorState` (or its `root`) to a
 * markdown string. Accepts the value as `unknown` because richtext leaves
 * arrive untyped from storage; non-richtext shapes return an empty string.
 */
export declare function lexicalToMarkdown(state: unknown, options?: LexicalToMarkdownOptions): LexicalToMarkdownResult;
