import { AuthPermission } from "../../../commons/auth-message"; import RichTextDocument from "../text/RichTextDocument"; import { CommentGroup, CommentsMap, CommentsMapHandler } from "./CommentsMap"; import { CommentData, Editor, RootElement, EditorDoc, TextAttributes, CommentsContainer, DocComment, BlockElement } from "../interface"; export declare const HighLightStyleId = "comment-highlight"; export declare const GroupIdAttr = "data-group-id"; export declare const CommentIdAttr = "data-comment-id"; export declare const CommentIdAttrPre = "comment-"; export declare const CommentContainerSpace = 20; export declare const CommentBubbleSpace = 20; export declare const MiniCommentBubbleSpace = 4; export declare const COMMENT_CLASS: { ROOT: string; MOBILE_ROOT: string; HEAD: string; COMMENT_COUNT: string; GROUPS_CONTAINER: string; GROUP_CONTAINER: string; GROUP_LAYER: string; ITEM: string; ITEM_HEAD: string; AVATAR: string; USERNAME: string; MODIFIED: string; WAITING_SHOW: string; TOOLS: string; BUTTON: string; EDIT: string; EDITING: string; GROUP_EDITING: string; DELETE: string; REPLY: string; REPLY_EDITOR: string; MINI: string; MINI_BUTTON_CONTAINER: string; SWITCH_CONTAINER: string; NEXT_COMMENT: string; PRE_COMMENT: string; QUOTE_CONTAINER: string; MORE_HANDLE: string; EDITOR_HANDLE_CONTAINER: string; CANCEL: string; SEND: string; REPLY_BTN: string; IMAGE_CONTAINER: string; IMAGE: string; MENU_ITEM_BUTTON_ICON_CONTAINER: string; MENU_ITEM_BUTTON_TEXT_CONTAINER: string; }; export declare abstract class MainComments extends CommentsContainer implements CommentsMapHandler { abstract editor: Editor; abstract commentsMap: CommentsMap; abstract rootContainer: HTMLElement; abstract onInsertComment(comment: DocComment): void; abstract onDeleteComment(comment: DocComment): void; abstract onUpdatePosition(): void; abstract highlightCommentGroupCore(commentGroup?: CommentGroup): void; } export declare function clearHighlight(element: Element | null): void; export declare function createCommentContent(editor: Editor, permission: AuthPermission, readonly: boolean, placeholder: string, data?: EditorDoc, callback?: { onChange?: (editor: Editor) => void; onBlur?: (editor: Editor) => void; }): { elem: HTMLDivElement; childEditor: Editor; }; export declare function createCommentRootContainer(editorRootElement: RootElement): HTMLElement; export declare function createCommentHead(rootContainer: HTMLElement, onHide: () => void, onShow: () => void): HTMLElement; export declare function createCommentGroupsContainer(rootContainer: HTMLElement): HTMLElement; export declare function createCommentItemId(id: string): string; export declare function createMoreMenuItem(text: string, icon: string, customClassName: string): HTMLButtonElement; export declare function createCommentTopTool(editor: Editor, abstract: string): HTMLElement; export declare function createCommentItem(editor: Editor, comment: CommentData, readonly: boolean): HTMLElement; export declare function createCommentGroupContainerId(groupId: string): string; export declare function createCommentGroup(editor: Editor, groupId: string, commentGroup: CommentGroup): HTMLDivElement; export declare function getCommentContainerSelector(): string; export declare function getCommentIdsFromAttr(attr: TextAttributes): string[]; export declare function getCommentTargetSelector(id: string): string; export declare function getCommentTargetSelectorWithoutEmbed(id: string): string; export declare function getCommentTargetSelectorForEmbed(id: string): string; export declare function getCommentGroupContainerById(rootContainer: Element, groupId: string): Element | null; export declare function getCommentItemContainerById(rootContainer: Element, id: string): Element | null; export declare function getHighlightCommentElement(rootContainer: Element): Element | null; export declare function getCommentEditor(commentItem: Element): Editor; export declare function getEditingCommentItems(container: Element): Element[]; export declare function getEditingReplyCommentItems(container: Element): Element[]; export declare function getCommentItemByChild(child: Element): Element | null; export declare function getReplyCommentItemByChild(child: Element): Element | null; export declare function getGroupLayer(groupContainer: Element): HTMLElement; export declare function updateHighlightStyle(rootContainer: HTMLElement, commentGroup: CommentGroup | undefined): void; export declare function checkGroupEditing(groupContainer: Element): void; export declare function removeCommentEditor(childEditor: Editor, groupContainer: Element | null, onResize: () => void): void; export declare function setCommentEditorReadOnly(childEditor: Editor, groupContainer: Element, readOnly: boolean, onResize: () => void): void; export declare function getCommentMentionData(editor: Editor, comment: CommentData): RichTextDocument; export declare function removeReplyInCommentItem(editor: Editor, replyCommentItem: HTMLElement): void; export declare function createReplyInCommentItem(editor: Editor, groupContainer: Element, comment: CommentData, hideMention: boolean, callback: { onSave: (editor: Editor, replyContainer: HTMLElement) => boolean; onCancel: (editor: Editor, replyContainer: HTMLElement) => boolean; onChangeHandleContainerStatus: () => void; }): HTMLDivElement; export declare function scrollItemIntoView(editor: Editor, commentGroupId: string, options?: { targetBlock?: BlockElement; }): void; export declare function scrollItemIntoViewForMobile(rootContainer: Element, commentGroupId: string): void;