import { default as React } from 'react';
import { Editor } from '@tiptap/core';
import { IComment } from '../extensions/comment';
import { CommentAnchor } from '../extensions/comment/comment-decoration-plugin';
import { CommentMutationMeta, SerializedCommentAnchor } from '../types';
import { createCommentStore } from './comment-store';

import * as Y from 'yjs';
export interface CommentStoreProviderProps {
    children: React.ReactNode;
    editor: Editor | null;
    ydoc: Y.Doc;
    isFocusMode?: boolean;
    setActiveCommentId: (id: string | null) => void;
    focusCommentWithActiveId: (id: string) => void;
    setInitialComments?: React.Dispatch<React.SetStateAction<IComment[]>>;
    onNewComment?: (comment: IComment, meta?: CommentMutationMeta) => void;
    onEditComment?: (commentId: string, meta?: CommentMutationMeta) => void;
    onEditReply?: (commentId: string, replyId: string, meta?: CommentMutationMeta) => void;
    onCommentReply?: (activeCommentId: string, reply: IComment) => void;
    onResolveComment?: (commentId: string, meta?: CommentMutationMeta) => void;
    onUnresolveComment?: (commentId: string, meta?: CommentMutationMeta) => void;
    onDeleteComment?: (commentId: string, meta?: CommentMutationMeta) => void;
    onDeleteReply?: (commentId: string, replyId: string) => void;
    onInlineComment?: () => void;
    onComment?: () => void;
    setCommentDrawerOpen?: (open: boolean) => void;
    connectViaWallet?: () => Promise<void>;
    connectViaUsername?: (username: string) => Promise<void>;
    ensResolutionUrl: string;
    commentAnchorsRef?: React.MutableRefObject<CommentAnchor[]>;
    draftAnchorsRef?: React.MutableRefObject<CommentAnchor[]>;
    /**
     * Ref populated by the provider with the Zustand store instance.
     * SuggestionTrackingExtension reads this inside event handlers to route
     * keystrokes into draft actions without rebuilding the editor.
     */
    storeApiRef?: React.MutableRefObject<ReturnType<typeof createCommentStore> | null>;
    initialCommentAnchors?: SerializedCommentAnchor[];
    initialComments: IComment[];
    username: string | null;
    activeCommentId: string | null;
    activeTabId: string;
    isConnected?: boolean;
    isLoading?: boolean;
    isDDocOwner?: boolean;
    setUsername?: React.Dispatch<React.SetStateAction<string>>;
}
export declare const CommentStoreProvider: ({ children, editor, ydoc, isFocusMode, setActiveCommentId, focusCommentWithActiveId, setInitialComments, onNewComment, onEditComment, onEditReply, onCommentReply, onResolveComment, onUnresolveComment, onDeleteComment, onDeleteReply, onInlineComment, onComment, setCommentDrawerOpen, connectViaWallet, connectViaUsername, ensResolutionUrl, commentAnchorsRef, draftAnchorsRef, storeApiRef, initialCommentAnchors, setUsername: setUsernameProp, initialComments, username, activeCommentId, activeTabId, isConnected, isLoading, isDDocOwner, }: CommentStoreProviderProps) => import("react/jsx-runtime").JSX.Element;
interface CommentRefsContextType {
    commentsSectionRef: React.RefObject<HTMLDivElement>;
    replySectionRef: React.RefObject<HTMLDivElement>;
    portalRef: React.RefObject<HTMLDivElement>;
    buttonRef: React.RefObject<HTMLDivElement>;
    dropdownRef: React.RefObject<HTMLDivElement>;
    mobileDraftRef: React.RefObject<HTMLDivElement>;
}
export declare const useCommentRefs: () => CommentRefsContextType;
interface CommentAnchorsContextType {
    activeCommentAnchorIds: Set<string>;
    activeCommentAnchorIdsTabId: string | null;
    hasRenderedCommentAnchor: (commentId: string) => boolean;
}
export declare const useCommentAnchors: () => CommentAnchorsContextType;
export {};
