export interface ReportFilters {
  year: number;
  company?: string;
  departmentId?: number;
}

export interface ReportOption {
  value: string;
  label: string;
}

export interface ReportsOptions {
  years: ReportOption[];
  companies: ReportOption[];
  departments: ReportOption[];
}

export interface EmployeeTranscriptRow {
  recordId: number;
  employeeId: number;
  employeeName: string;
  employeeCode: string | null;
  companyName: string | null;
  departmentName: string | null;
  courseName: string;
  trainingType: 'online' | 'onsite' | 'internal' | 'external';
  category: 'K' | 'S' | 'A' | null;
  trainingDate: string;
  submittedHours: number;
  approvedHours: number | null;
  status: 'draft' | 'pending' | 'approved' | 'rejected' | 'needs_revision';
}

export interface TrainingMatrixReportRow {
  employeeId: number;
  employeeName: string;
  employeeCode: string | null;
  companyName: string | null;
  departmentName: string | null;
  positionName: string | null;
  requiredCourses: number;
  completedCourses: number;
  compliancePercent: number;
  approvedHours: number;
  targetHours: number;
  targetSource: 'employee' | 'policy' | 'default';
  targetStatus: 'passed' | 'not_passed';
  missingCourses: string;
}

export interface DepartmentSummaryRow {
  departmentName: string;
  employeeCount: number;
  trainingRecords: number;
  approvedRecords: number;
  pendingRecords: number;
  rejectedRecords: number;
  approvedHours: number;
}

export interface AnnualTrainingSummaryRow {
  monthNumber: number;
  monthLabel: string;
  submittedRecords: number;
  approvedRecords: number;
  pendingRecords: number;
  rejectedRecords: number;
  submittedHours: number;
  approvedHours: number;
}

export interface ReportsDataset {
  filters: ReportFilters;
  options: ReportsOptions;
  employeeTranscript: EmployeeTranscriptRow[];
  trainingMatrix: TrainingMatrixReportRow[];
  departmentSummary: DepartmentSummaryRow[];
  annualTrainingSummary: AnnualTrainingSummaryRow[];
}
