/**
 * 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
 */
import type * as React from 'react';
interface MarkdownModeContextValue {
    /** React state — drives toolbar button active styling and re-render. */
    isMarkdown: boolean;
    setIsMarkdown: (value: boolean) => void;
    /**
     * Synchronous mirror of {@link isMarkdown} for non-React readers — the
     * editor's `OnChangePlugin` guard consults this to decide whether to
     * suppress form persistence. React state updates are async, so the
     * toggle handler writes the ref eagerly (before mutating the editor) to
     * guarantee the markdown-source snapshot is never emitted to the form.
     */
    markdownModeRef: React.MutableRefObject<boolean>;
}
/**
 * Holds the per-editor "view as markdown source" mode. Sits OUTSIDE the
 * Lexical composer (alongside the shared on-change / history contexts) so
 * both the in-composer editor surface and the toolbar button read the same
 * mode — and so node decorators rendered as composer siblings can see it.
 */
export declare function MarkdownModeProvider({ children, }: {
    children: React.ReactNode;
}): React.JSX.Element;
export declare function useMarkdownMode(): MarkdownModeContextValue;
export {};
