import type { LexicalEditor, NodeKey } from "lexical"; import { Provider } from "@lexical/yjs"; import { Array as YArray, Map as YMap } from "yjs"; export type Comment = { author: string; content: string; deleted: boolean; id: string; timeStamp: string; type: "comment"; quote?: string; userEmail?: string; mentionedEmails?: string[]; }; export type CommentBoxProps = { name: string; closeIcon: string; onSend: (comment: string) => void; onClose: () => void; activeIDs?: Array; comments?: Comments; deleteCommentOrThread?: (commentOrThread?: Comment | Thread, thread?: Thread) => void; listRef?: { current: null | HTMLUListElement; }; markNodeMap?: Map>; submitAddComment?: (commentOrThread: Comment | Thread, isInlineComment: boolean, thread?: Thread) => void; resolveThread?: any; }; export type wpAndTaskIdType = { workplanId: string; taskId: string; }; export type Thread = { comments: Array; id: string; quote: string; type: "thread"; resolved: boolean; wpAndTaskId?: wpAndTaskIdType; }; export type Comments = Array; export declare function createComment(content: string, author: string, userEmail?: string, mentionedEmails?: string[], timeStamp?: string, id?: string, deleted?: boolean): Comment; export declare function createThread(quote: string, comments: Array, id?: string, wpAndTaskId?: wpAndTaskIdType): Thread; export declare class CommentStore { _editor: LexicalEditor; _comments: Comments; _changeListeners: Set<() => void>; _collabProvider: null | Provider; constructor(editor: LexicalEditor); isCollaborative(): boolean; getComments(): Comments; setComments(comments: Comments): void; addComment(commentOrThread: Comment | Thread, thread?: Thread, offset?: number): void; deleteCommentOrThread(commentOrThread: Comment | Thread, thread?: Thread): { markedComment: Comment; index: number; } | null; resolveThread(thread: Thread): void; registerOnChange(onChange: () => void): () => void; _withRemoteTransaction(fn: () => void): void; _withLocalTransaction(fn: () => void): void; _getCollabComments(): null | YArray; _createCollabSharedMap(commentOrThread: Comment | Thread): YMap; registerCollaboration(provider: Provider): () => void; } export declare function useCommentStore(commentStore: CommentStore): Comments;