import { AssignToType, CommentAccessMode, CommentEventTypes, CommentStatus } from "../../utils/enums";
import { Attachment } from "./attachment.model";
import { VeltButtonClickEvent } from "./button.data.model";
import { AddAttachmentResponse } from "./comment-actions.data.model";
import { CommentAnnotation, UpdateContextConfig } from "./comment-annotation.data.model";
import { Comment } from "./comment.data.model";
import { CustomPriority, CustomStatus } from "./custom-filter.data.model";
import { VeltEventMetadata } from "./event-metadata.data.model";
import { Location } from "./location.model";
import { ReactionAnnotation } from "./reaction-annotation.data.model";
import { RecordedData } from "./recorder.model";
import { UserContact } from "./user-contact.data.model";
import { User } from "./user.data.model";
/**
 * @deprecated Use `AddCommentAnnotationEvent` instead
 */
export interface CommentAddEventData {
    annotation: CommentAnnotation;
    location?: Location;
    documentId?: string;
    addContext: (context: any) => void;
    targetAnnotationId?: string;
    targetCommentId?: number;
    elementRef?: {
        xpath: string;
    };
}
/**
 * @deprecated Use respective events instead
 */
export interface CommentEvent {
    annotation?: CommentAnnotation | null;
    element?: HTMLElement;
    type?: string;
    targetAnnotationId?: string;
    targetCommentId?: number;
    updateContext?: (context: any, config?: UpdateContextConfig) => void;
}
/**
 * @deprecated Use respective events instead
 */
export interface CommentUpdateEventData extends CommentEvent {
}
/**
 * @deprecated Use `AcceptCommentAnnotationEvent` and `RejectCommentAnnotationEvent` instead
 */
export interface CommentSuggestionEventData {
    annotationId: string;
    actionUser?: User;
    actionType?: CommentStatus;
    replaceContentHtml?: string;
    replaceContentText?: string;
    annotation?: any;
}
export type CommentEventTypesMap = {
    [CommentEventTypes.ADD_COMMENT_ANNOTATION]: AddCommentAnnotationEvent;
    [CommentEventTypes.APPROVE_COMMENT_ANNOTATION]: ApproveCommentAnnotationEvent;
    [CommentEventTypes.ACCEPT_COMMENT_ANNOTATION]: AcceptCommentAnnotationEvent;
    [CommentEventTypes.REJECT_COMMENT_ANNOTATION]: RejectCommentAnnotationEvent;
    [CommentEventTypes.SUBSCRIBE_COMMENT_ANNOTATION]: SubscribeCommentAnnotationEvent;
    [CommentEventTypes.UNSUBSCRIBE_COMMENT_ANNOTATION]: UnsubscribeCommentAnnotationEvent;
    [CommentEventTypes.DELETE_COMMENT_ANNOTATION]: DeleteCommentAnnotationEvent;
    [CommentEventTypes.ASSIGN_USER]: AssignUserEvent;
    [CommentEventTypes.UPDATE_PRIORITY]: UpdatePriorityEvent;
    [CommentEventTypes.UPDATE_STATUS]: UpdateStatusEvent;
    [CommentEventTypes.UPDATE_ACCESS]: UpdateAccessEvent;
    [CommentEventTypes.RESOLVE_COMMENT]: ResolveCommentEvent;
    [CommentEventTypes.ADD_COMMENT]: AddCommentEvent;
    [CommentEventTypes.UPDATE_COMMENT]: UpdateCommentEvent;
    [CommentEventTypes.DELETE_COMMENT]: DeleteCommentEvent;
    [CommentEventTypes.ADD_ATTACHMENT]: AddAttachmentEvent;
    [CommentEventTypes.DELETE_ATTACHMENT]: DeleteAttachmentEvent;
    [CommentEventTypes.DELETE_RECORDING]: DeleteRecordingEvent;
    [CommentEventTypes.COPY_LINK]: CopyLinkEvent;
    [CommentEventTypes.ADD_REACTION]: AddReactionEvent;
    [CommentEventTypes.DELETE_REACTION]: DeleteReactionEvent;
    [CommentEventTypes.TOGGLE_REACTION]: ToggleReactionEvent;
    [CommentEventTypes.COMMENT_SIDEBAR_DATA_INIT]: CommentSidebarDataInitEvent;
    [CommentEventTypes.COMMENT_SIDEBAR_DATA_UPDATE]: CommentSidebarDataUpdateEvent;
    [CommentEventTypes.AUTOCOMPLETE_SEARCH]: AutocompleteSearchEvent;
    [CommentEventTypes.COMPOSER_CLICKED]: ComposerClickedEvent;
    [CommentEventTypes.LINK_CLICKED]: LinkClickedEvent;
    [CommentEventTypes.COMMENT_PIN_CLICKED]: CommentPinClickedEvent;
    [CommentEventTypes.COMMENT_BUBBLE_CLICKED]: CommentBubbleClickedEvent;
    [CommentEventTypes.COMPOSER_TEXT_CHANGE]: ComposerTextChangeEvent;
    [CommentEventTypes.COMMENT_TOOL_CLICK]: CommentToolClickEvent;
    [CommentEventTypes.SIDEBAR_BUTTON_CLICK]: SidebarButtonClickEvent;
    [CommentEventTypes.ATTACHMENT_DOWNLOAD_CLICKED]: AttachmentDownloadClickedEvent;
};
export interface AddAttachmentEvent {
    annotationId: string;
    commentAnnotation: CommentAnnotation;
    attachments: AddAttachmentResponse[];
    metadata: VeltEventMetadata;
}
export interface DeleteAttachmentEvent {
    annotationId: string;
    commentId: number;
    commentAnnotation: CommentAnnotation;
    attachment: Attachment;
    metadata: VeltEventMetadata;
}
export interface AddCommentAnnotationEvent {
    annotationId: string;
    commentAnnotation: CommentAnnotation;
    metadata: VeltEventMetadata;
    addContext: (context: any) => void;
    elementRef?: {
        xpath: string;
    };
}
export interface ApproveCommentAnnotationEvent {
    annotationId: string;
    commentAnnotation: CommentAnnotation;
    metadata: VeltEventMetadata;
}
export interface AcceptCommentAnnotationEvent {
    annotationId: string;
    commentAnnotation: CommentAnnotation;
    metadata: VeltEventMetadata;
    actionUser: User;
    replaceContentHtml?: string;
    replaceContentText?: string;
}
export interface RejectCommentAnnotationEvent {
    annotationId: string;
    commentAnnotation: CommentAnnotation;
    metadata: VeltEventMetadata;
    actionUser: User;
    replaceContentHtml?: string;
    replaceContentText?: string;
}
export interface DeleteCommentAnnotationEvent {
    annotationId: string;
    commentAnnotation: CommentAnnotation;
    metadata: VeltEventMetadata;
}
export interface GetCommentAnnotationsResponse {
    data: Record<string, CommentAnnotation[]> | null;
}
export interface FetchCommentAnnotationsResponse extends GetCommentAnnotationsResponse {
    nextPageToken?: string;
}
export interface GetCommentAnnotationsCountResponse {
    data: Record<string, CommentAnnotationsCount> | null;
}
export interface CommentAnnotationsCount {
    unread: number;
    total: number;
}
export interface SubscribeCommentAnnotationEvent {
    annotationId: string;
    commentAnnotation: CommentAnnotation;
    metadata: VeltEventMetadata;
}
export interface UnsubscribeCommentAnnotationEvent {
    annotationId: string;
    commentAnnotation: CommentAnnotation;
    metadata: VeltEventMetadata;
}
export interface AssignUserEvent {
    annotationId: string;
    assignedTo: UserContact;
    commentAnnotation: CommentAnnotation;
    metadata?: VeltEventMetadata;
}
export interface AddCommentEvent {
    annotationId: string;
    commentAnnotation: CommentAnnotation;
    commentId: number;
    comment: Comment;
    metadata: VeltEventMetadata;
}
export interface UpdateCommentEvent {
    annotationId: string;
    commentAnnotation: CommentAnnotation;
    commentId: number;
    comment: Comment;
    metadata: VeltEventMetadata;
}
export interface DeleteCommentEvent {
    annotationId: string;
    commentAnnotation: CommentAnnotation;
    commentId: number;
    comment: Comment;
    metadata: VeltEventMetadata;
}
export interface DeleteRecordingEvent {
    annotationId: string;
    commentAnnotation: CommentAnnotation;
    commentId: number;
    recording: RecordedData;
    metadata: VeltEventMetadata;
}
export interface ReactionEvent {
    annotationId: string;
    commentAnnotation: CommentAnnotation;
    commentId: number;
    reaction: ReactionAnnotation;
    metadata: VeltEventMetadata;
}
export interface AddReactionEvent extends ReactionEvent {
}
export interface DeleteReactionEvent extends ReactionEvent {
}
export interface ToggleReactionEvent extends ReactionEvent {
}
export interface UpdateStatusEvent {
    annotationId: string;
    commentAnnotation: CommentAnnotation;
    newStatus: CustomStatus;
    oldStatus: CustomStatus;
    metadata: VeltEventMetadata;
}
export interface UpdatePriorityEvent {
    annotationId: string;
    commentAnnotation: CommentAnnotation;
    newPriority?: CustomPriority;
    oldPriority?: CustomPriority;
    metadata: VeltEventMetadata;
}
export interface UpdateAccessEvent {
    annotationId: string;
    commentAnnotation: CommentAnnotation;
    newAccessMode?: CommentAccessMode;
    oldAccessMode?: CommentAccessMode;
    metadata: VeltEventMetadata;
}
export interface ResolveCommentEvent {
    annotationId: string;
    commentAnnotation: CommentAnnotation;
    metadata: VeltEventMetadata;
}
export interface GetLinkResponse {
    annotationId: string;
    commentAnnotation: CommentAnnotation;
    link: string | null;
    metadata: VeltEventMetadata;
}
export interface CopyLinkEvent {
    annotationId: string;
    commentAnnotation: CommentAnnotation;
    link: string;
    metadata: VeltEventMetadata;
}
export interface CommentSidebarDataInitEvent extends VeltButtonClickEvent {
}
export interface CommentSidebarDataUpdateEvent extends VeltButtonClickEvent {
}
export interface AutocompleteSearchEvent {
    event: KeyboardEvent | InputEvent | Event;
    searchText: string;
    type?: 'contact' | 'custom' | 'group';
    metadata?: VeltEventMetadata;
}
export interface ComposerClickedEvent {
    commentAnnotation?: CommentAnnotation;
    metadata?: VeltEventMetadata;
}
export interface LinkClickedEvent {
    text: string;
    link: string;
    commentAnnotation: CommentAnnotation;
    commentId: Number;
    metadata?: VeltEventMetadata;
}
export interface CommentPinClickedEvent {
    annotationId: string;
    commentAnnotation: CommentAnnotation;
    metadata?: VeltEventMetadata;
}
export interface CommentBubbleClickedEvent {
    annotationId: string;
    commentAnnotation: CommentAnnotation;
    metadata?: VeltEventMetadata;
}
export interface ComposerTextChangeEvent {
    text: string;
    annotation: CommentAnnotation;
    targetComposerElementId: string;
    metadata?: VeltEventMetadata;
}
export interface CommentToolClickEvent {
    context: {
        [key: string]: any;
    } | null;
    targetElementId?: string | null;
    metadata?: VeltEventMetadata;
}
export interface SidebarButtonClickEvent {
    metadata?: VeltEventMetadata;
}
export interface AttachmentDownloadClickedEvent {
    annotationId: string;
    commentAnnotation: CommentAnnotation;
    attachment: Attachment;
    metadata?: VeltEventMetadata;
}
export interface PageModeComposerConfig {
    context?: {
        [key: string]: any;
    } | null;
    targetElementId?: string | null;
}
export interface AssignToConfig {
    type: AssignToType;
}
