export interface DiffHunk {
  header: string;
  oldStart: number;
  oldCount: number;
  newStart: number;
  newCount: number;
  lines: DiffLine[];
}

export interface DiffLine {
  type: "added" | "removed" | "context";
  content: string;
  oldLineNumber: number | null;
  newLineNumber: number | null;
}

export interface FileDiff {
  oldPath: string;
  newPath: string;
  hunks: DiffHunk[];
  additions: number;
  deletions: number;
}

export interface ReviewComment {
  id: string;
  filePath: string;
  lineNumber: number; // new-side line number (or old-side for deletions)
  lineType: "added" | "removed" | "context";
  body: string;
  author: string;
  createdAt: string;
  resolved: boolean;
}

export type ReviewStatus = "pending" | "approved" | "changes_requested";

export interface ReviewSummary {
  id: string;
  title: string;
  description: string;
  author: string;
  status: ReviewStatus;
  comments: ReviewComment[];
  files: FileDiff[];
  createdAt: string;
  sourceBranch: string;
  targetBranch: string;
}
