export interface CoverageConfig {
  exclude: string[];
  include?: string[];
  reporters: ReporterType[];
  thresholds: CoverageThresholds;
  outputDir: string;
  workspaceRoot?: string;
  packages?: string[];
}

export type ReporterType = 'terminal' | 'html' | 'html-full' | 'markdown' | 'json' | 'text' | 'lcov';

export interface CoverageThresholds {
  lines?: number;
  functions?: number;
  branches?: number;
  statements?: number;
}

export interface PackageCoverage {
  name: string;
  path: string;
  lines: CoverageMetric;
  functions: CoverageMetric;
  branches: CoverageMetric;
  statements: CoverageMetric;
  files: FileCoverage[];
}

export interface CoverageMetric {
  total: number;
  covered: number;
  skipped: number;
  percentage: number;
}

export interface FileCoverage {
  path: string;
  lines: CoverageMetric;
  functions: CoverageMetric;
  branches: CoverageMetric;
  statements: CoverageMetric;
}

export interface CoverageReport {
  timestamp: string;
  packages: PackageCoverage[];
  overall: {
    lines: CoverageMetric;
    functions: CoverageMetric;
    branches: CoverageMetric;
    statements: CoverageMetric;
  };
  config: CoverageConfig;
}

export interface CLIOptions {
  packages?: string[];
  exclude?: string[];
  include?: string[];
  reporters?: string[];
  threshold?: number;
  thresholdLines?: number;
  thresholdFunctions?: number;
  thresholdBranches?: number;
  thresholdStatements?: number;
  outputDir?: string;
  config?: string;
  watch?: boolean;
  failUnder?: boolean;
}