export type MentionDTO = {
	id: string;
	firstName: string;
	lastName: string;
};

export type CommentReply = {
	id: string;
	authorId: string | null;
	authorName: string;
	content: string;
	createdAt: string;
	updatedAt: string;
	mentionDTOs?: MentionDTO[];
};

export type FlatMessage = {
	id: string;
	authorId: string | null;
	authorName: string;
	content: string;
	createdAt: string;
	updatedAt: string;
	mentionDTOs?: MentionDTO[];
};

export type Comment = {
	id: string;
	authorId: string | null;
	authorName: string;
	content: string;
	createdAt: string;
	updatedAt: string;
	replies: CommentReply[];
	mentionDTOs?: MentionDTO[];
};

export type DocumentPanelTab = 'metadata' | 'transcription' | 'discussion' | 'history';

export type PersonMention = {
	personId: string;
	displayName: string;
};

export type TranscriptionBlockData = {
	id: string;
	annotationId: string;
	documentId: string;
	text: string;
	label: string | null;
	sortOrder: number;
	version: number;
	source: 'MANUAL' | 'OCR';
	reviewed: boolean;
	mentionedPersons: PersonMention[];
	updatedAt?: string | null;
};

export type Annotation = {
	id: string;
	documentId: string;
	pageNumber: number;
	x: number;
	y: number;
	width: number;
	height: number;
	color: string;
	createdAt: string;
	fileHash?: string | null;
	polygon?: [number, number][] | null;
};
