import type { Node } from "prosemirror-model"; import type { DocInfo, EditorUser } from "../types.js"; export interface MarginBoxFilterOptions { track?: boolean; comments?: boolean; info?: boolean; help?: boolean; warning?: boolean; commentsResolved?: boolean; commentsOnlyMajor?: boolean; commentsAuthor?: number; trackAuthor?: number; author?: number; assigned?: number; } export interface CommentAnswer { id: number | string; user: number; username: string; date: number; answer: unknown[]; } export interface Comment { id: number; user: number; username: string; date: number; comment: unknown[]; answers?: CommentAnswer[]; isMajor?: boolean; resolved?: boolean; hidden?: boolean; isGlobal?: boolean; assignedUser?: number; assignedUsername?: string; } export interface TrackData { user: number; username: string; date: number; before?: string[] | { type: string; attrs?: { order?: number; level?: number; }; }; after?: string[]; } export interface Participant { id: number; name: string; } export interface CommentMarginBox { type: "comment"; data: Comment; view: string; active: boolean; pos?: number; } export interface TrackMarginBox { type: "insertion" | "deletion" | "format_change" | "block_change"; data: TrackData; node: Node; view: string; active: boolean; pos?: number; } export interface HelpMarginBox { type: "help"; data: { active?: boolean; help: unknown; }; active?: boolean; } export interface WarningMarginBox { type: "warning"; data: { active?: boolean; warning: string; }; active?: boolean; } export type MarginBox = CommentMarginBox | TrackMarginBox | HelpMarginBox | WarningMarginBox; interface MarginBoxOptionComment { answer?: boolean; id: number | string; commentId?: number | string; user: number; resolved?: boolean; } export declare const marginboxFilterTemplate: ({ marginBoxes, filterOptions, pastParticipants }: { marginBoxes: MarginBox[]; filterOptions: MarginBoxFilterOptions; pastParticipants: Participant[]; }) => string; /** A template to display global document comments in the main column */ export declare const globalCommentsTemplate: ({ globalComments, editComment, activeCommentAnswerId, user, docInfo, filterOptions }: { globalComments: CommentMarginBox[]; editComment: boolean; activeCommentAnswerId: number | string | undefined; user: EditorUser; docInfo: DocInfo; filterOptions: MarginBoxFilterOptions; }) => string; /** A template to display all the margin boxes (comments, deletion/insertion notifications) */ export declare const marginBoxesTemplate: ({ marginBoxes, editComment, activeCommentAnswerId, user, docInfo, filterOptions }: { marginBoxes: MarginBox[]; editComment: boolean; activeCommentAnswerId: number | string | undefined; user: EditorUser; docInfo: DocInfo; filterOptions: MarginBoxFilterOptions; }) => string; export declare const marginBoxOptions: (comment: MarginBoxOptionComment, user: EditorUser, docInfo: DocInfo) => string; export {}; //# sourceMappingURL=templates.d.ts.map