import { Editor, JSONContent } from '@tiptap/react';
import { DdocExportModalProps } from '../components/export-modal';
import { UseHeadlessEditorProps } from './use-headless-editor';

import * as Y from 'yjs';
export type HeadlessEditorExportFormat = 'pdf' | 'md' | 'html' | 'txt' | 'odt';
export interface HeadlessEditorExportOption {
    content: string;
    fileName?: string;
    initialFormat?: HeadlessEditorExportFormat;
}
export declare const useExportHeadlessEditorContent: (props?: UseHeadlessEditorProps & {
    onExportError?: (error: unknown) => void;
}) => {
    exportContent: (option: HeadlessEditorExportOption) => void;
    exportModalProps: DdocExportModalProps;
    setContent: (initialContent: string | string[] | JSONContent, editor: Editor, ydoc: Y.Doc) => void;
    getEditor: () => {
        editor: Editor;
        ydoc: Y.Doc;
    };
    getYjsConvertor: () => {
        convertJSONContentToYjsEncodedString: (content: JSONContent) => string;
        cleanup: () => void;
    };
    downloadContentAsMd: (content: string | string[] | JSONContent, title: string) => Promise<void>;
    downloadContentAsHtml: (content: string | string[] | JSONContent, title: string) => Promise<void>;
    downloadContentAsTxt: (content: string | string[] | JSONContent, title: string) => Promise<void>;
    mergeYjsUpdates: (contents: string[]) => string;
    handleMarkdownContent: typeof import('../extensions/mardown-paste-handler').handleMarkdownContent;
    getYjsContentFromMarkdown: (file: File, ipfsImageUploadFn: (file: File) => Promise<import('../types').IpfsImageUploadResponse>) => Promise<string | null>;
    getYjsContentFromDocx: (file: File, ipfsImageUploadFn: (file: File) => Promise<import('../types').IpfsImageUploadResponse>) => Promise<string | null>;
};
