import { Dispatch, MutableRefObject, SetStateAction } from 'react';
import { DdocProps, SerializedCommentAnchor, ThemeKey } from '../types';
import { AnyExtension, Editor } from '@tiptap/react';
import { CommentAnchor } from '../extensions/comment/comment-decoration-plugin';
import { DBlockRuntimeStateRef } from '../extensions/d-block/dblock-runtime';
import { ToCItemType } from '../components/toc/types';
import { CollabConnectionConfig, CollaborationProps } from '../sync-local/types';

import * as Y from 'yjs';
export interface CachedTabEditorRenderEntry {
    tabId: string;
    editor: Editor;
    isActive: boolean;
}
interface UseTabEditorArgs {
    ydoc: Y.Doc;
    isVersionMode?: boolean;
    hasTabState?: boolean;
    versionId?: string;
    isPreviewMode?: boolean;
    viewerMode?: DdocProps['viewerMode'];
    initialContent: DdocProps['initialContent'];
    collaboration?: CollaborationProps;
    isReady?: boolean;
    isSyncing?: boolean;
    awareness?: any;
    disableInlineComment?: boolean;
    isFocusMode?: boolean;
    onCommentInteraction?: DdocProps['onCommentInteraction'];
    onError?: DdocProps['onError'];
    ipfsImageUploadFn?: DdocProps['ipfsImageUploadFn'];
    metadataProxyUrl?: string;
    onCopyHeadingLink?: DdocProps['onCopyHeadingLink'];
    ipfsImageFetchFn?: DdocProps['ipfsImageFetchFn'];
    fetchV1ImageFn?: DdocProps['fetchV1ImageFn'];
    isConnected?: boolean;
    activeModel?: DdocProps['activeModel'];
    maxTokens?: number;
    isAIAgentEnabled?: boolean;
    setCharacterCount?: DdocProps['setCharacterCount'];
    setWordCount?: DdocProps['setWordCount'];
    setPageCount?: DdocProps['setPageCount'];
    setIsContentLoading: Dispatch<SetStateAction<boolean>>;
    setIsCollabContentLoading: Dispatch<SetStateAction<boolean>>;
    unFocused?: boolean;
    zoomLevel?: string;
    isPresentationMode?: boolean;
    onInvalidContentError?: DdocProps['onInvalidContentError'];
    ignoreCorruptedData?: boolean;
    onCollaboratorChange?: DdocProps['onCollaboratorChange'];
    onConnect: (connectConfig: CollabConnectionConfig) => void;
    hasCollabContentInitialised?: boolean;
    initialiseYjsIndexedDbProvider: () => Promise<void>;
    externalExtensions?: Record<string, AnyExtension>;
    isContentLoading?: boolean;
    activeTabId: string;
    tabIds?: string[];
    theme?: ThemeKey;
    editorRef?: MutableRefObject<Editor | null>;
    initialCommentAnchors?: SerializedCommentAnchor[];
    dBlockRuntimeStateRef?: DBlockRuntimeStateRef;
}
export declare const useTabEditor: ({ ydoc, isVersionMode, hasTabState, versionId, isPreviewMode, viewerMode, initialContent, collaboration, isReady, isSyncing, awareness, disableInlineComment, isFocusMode, onCommentInteraction, onError, ipfsImageUploadFn, metadataProxyUrl, onCopyHeadingLink, ipfsImageFetchFn, fetchV1ImageFn, isConnected, activeModel, maxTokens, isAIAgentEnabled, setCharacterCount, setWordCount, setPageCount, setIsContentLoading, setIsCollabContentLoading, unFocused, zoomLevel, isPresentationMode, onInvalidContentError, ignoreCorruptedData, onCollaboratorChange, onConnect, hasCollabContentInitialised, initialiseYjsIndexedDbProvider, externalExtensions, isContentLoading, activeTabId, tabIds, theme, editorRef, initialCommentAnchors, dBlockRuntimeStateRef, }: UseTabEditorArgs) => {
    editor: Editor | null;
    cachedEditorEntries: CachedTabEditorRenderEntry[];
    ref: import('react').RefObject<HTMLDivElement>;
    slides: string[];
    setSlides: Dispatch<SetStateAction<string[]>>;
    tocItems: ToCItemType[];
    setTocItems: Dispatch<SetStateAction<ToCItemType[]>>;
    activeCommentId: string | null;
    setActiveCommentId: Dispatch<SetStateAction<string | null>>;
    focusCommentWithActiveId: (id: string) => void;
    isContentLoading: boolean | undefined;
    commentAnchorsRef: MutableRefObject<CommentAnchor[]>;
    draftAnchorsRef: MutableRefObject<CommentAnchor[]>;
    storeApiRef: MutableRefObject<import('zustand').StoreApi<import('../stores/comment-store').CommentStoreState> | null>;
};
export {};
