export interface FileChange {
  path: string
  status: 'added' | 'modified' | 'deleted' | 'renamed' | 'copied' | 'untracked'
  oldPath?: string
  staged: boolean
}

export interface GitStatus {
  branch: string
  staged: FileChange[]
  unstaged: FileChange[]
  untracked: string[]
  ahead: number
  behind: number
}

export interface CommitInfo {
  sha: string
  shortSha: string
  author: string
  email: string
  timestamp: number
  message: string
  body?: string
  files?: FileDiff[]
}

export interface DiffLine {
  type: 'context' | 'add' | 'delete'
  content: string
}

export interface DiffHunk {
  oldStart: number
  oldLines: number
  newStart: number
  newLines: number
  header?: string
  lines: DiffLine[]
}

export interface FileDiff {
  path: string
  oldPath?: string
  status: 'added' | 'modified' | 'deleted' | 'renamed'
  isBinary: boolean
  hunks: DiffHunk[]
}

export interface DiffResult {
  raw: string
  files: FileDiff[]
}

export interface BranchInfo {
  name: string
  isCurrent: boolean
  isRemote: boolean
}

export interface CompareResult {
  base: string
  head: string
  files: FileDiff[]
  stats: {
    filesChanged: number
    additions: number
    deletions: number
  }
}

export interface TreeNode {
  name: string
  path: string
  type: 'file' | 'directory'
  children?: TreeNode[]
}

export interface FileContent {
  path: string
  isBinary: boolean
  content: string | null
  size: number
  extension?: string
}
