'use client';

export type SeverityLevel = 'High' | 'Medium' | 'Low';
export type ComplaintType =
  | 'Attendance/Tardiness'
  | 'Insubordination'
  | 'Harassment'
  | 'Fraud/Theft'
  | 'Safety Violation'
  | 'Confidentiality Breach'
  | 'Performance-Related'
  | 'Other';

export interface EvidenceFile {
  name: string;
  size: string;
  type: string;
  url?: string;
}

export interface DisciplinaryCase {
  id: string;
  caseNumber: string;
  employeeName: string;
  employeeId: string;
  department: string;
  complaintType: ComplaintType;
  severity: SeverityLevel;
  incidentDate: string;
  description: string;
  witnesses?: string;
  evidenceFiles: EvidenceFile[];
  isConfidential: boolean;
  createdBy: string;
  createdByRole: string;
  createdAt: string;
  updatedBy?: string;
  updatedAt?: string;
}

export const disciplinaryCases: DisciplinaryCase[] = [
  {
    id: '1',
    caseNumber: 'DC-2026-001',
    employeeName: 'John Kamau',
    employeeId: 'UF-0042',
    department: 'Finance',
    complaintType: 'Confidentiality Breach',
    severity: 'High',
    incidentDate: '2026-04-01',
    description: 'Employee was found accessing confidential payroll records without authorization. CCTV footage shows the employee at a restricted workstation. Multiple unauthorized access attempts were logged by the IT security system over a 3-day period.',
    witnesses: 'Peter Mwangi, Sarah Njoroge',
    evidenceFiles: [{ name: 'cctv_footage_report.pdf', size: '2.4 MB', type: 'pdf' }],
    isConfidential: false,
    createdBy: 'Grace Wanjiku',
    createdByRole: 'HR',
    createdAt: '2026-04-01T15:00:00',
  },
  {
    id: '2',
    caseNumber: 'DC-2026-002',
    employeeName: 'Mary Akinyi',
    employeeId: 'UF-0017',
    department: 'Customer Service',
    complaintType: 'Harassment',
    severity: 'High',
    incidentDate: '2026-03-25',
    description: 'Employee verbally abused a customer and used offensive language. Customer filed a formal complaint. Incident was witnessed by three colleagues and partially captured on floor CCTV.',
    witnesses: 'Lucy Wambua, Kevin Mutua, Jane Atieno',
    evidenceFiles: [{ name: 'customer_complaint_letter.pdf', size: '1.1 MB', type: 'pdf' }, { name: 'cctv_screenshot.jpg', size: '890 KB', type: 'jpg' }],
    isConfidential: false,
    createdBy: 'James Otieno',
    createdByRole: 'HR',
    createdAt: '2026-03-25T10:30:00',
  },
  {
    id: '3',
    caseNumber: 'DC-2026-003',
    employeeName: 'Paul Nderitu',
    employeeId: 'UF-0031',
    department: 'Operations',
    complaintType: 'Attendance/Tardiness',
    severity: 'Medium',
    incidentDate: '2026-02-10',
    description: 'Employee arrived 2.5 hours late for duty without prior notice. This is the fourth occurrence in two months. Employee failed to inform supervisor or update attendance system.',
    witnesses: 'Samuel Maina',
    evidenceFiles: [{ name: 'attendance_records.pdf', size: '540 KB', type: 'pdf' }],
    isConfidential: false,
    createdBy: 'Samuel Maina',
    createdByRole: 'HOD',
    createdAt: '2026-02-10T09:00:00',
  },
  {
    id: '4',
    caseNumber: 'DC-2026-004',
    employeeName: 'Alice Mwenda',
    employeeId: 'UF-0055',
    department: 'ICT',
    complaintType: 'Fraud/Theft',
    severity: 'High',
    incidentDate: '2026-01-15',
    description: 'Employee found to have installed unauthorized software on company servers that created a security backdoor. Internal audit flagged unusual outbound traffic. Investigation revealed the backdoor had been active for approximately 6 weeks.',
    witnesses: 'Tom Njuguna',
    evidenceFiles: [{ name: 'forensic_report.pdf', size: '3.8 MB', type: 'pdf' }, { name: 'network_logs.docx', size: '1.2 MB', type: 'docx' }],
    isConfidential: true,
    createdBy: 'Michael Kariuki',
    createdByRole: 'HOD',
    createdAt: '2026-01-15T16:45:00',
  },
  {
    id: '5',
    caseNumber: 'DC-2026-005',
    employeeName: 'David Ochieng',
    employeeId: 'UF-0028',
    department: 'Procurement',
    complaintType: 'Insubordination',
    severity: 'Medium',
    incidentDate: '2026-04-10',
    description: 'Employee allegedly refused to follow direct instructions from the acting department head, publicly disputed a decision in front of the entire team, and made derogatory comments about management.',
    witnesses: 'Kevin Mutua, Jane Atieno',
    evidenceFiles: [],
    isConfidential: false,
    createdBy: 'Nancy Wanjau',
    createdByRole: 'HR',
    createdAt: '2026-04-10T11:30:00',
  },
  {
    id: '6',
    caseNumber: 'DC-2026-006',
    employeeName: 'Esther Njeri',
    employeeId: 'UF-0011',
    department: 'Monitoring & Evaluation',
    complaintType: 'Safety Violation',
    severity: 'Medium',
    incidentDate: '2026-03-18',
    description: 'Employee was observed operating heavy equipment without the required safety gear on two separate occasions. Safety officer issued verbal warnings which were ignored. Incident poses significant risk to employee and colleagues.',
    witnesses: 'Brian Omondi',
    evidenceFiles: [{ name: 'safety_incident_report.pdf', size: '760 KB', type: 'pdf' }],
    isConfidential: false,
    createdBy: 'Robert Kariuki',
    createdByRole: 'HOD',
    createdAt: '2026-03-18T14:00:00',
  },
  {
    id: '7',
    caseNumber: 'DC-2026-007',
    employeeName: 'Brian Omondi',
    employeeId: 'UF-0012',
    department: 'ICT',
    complaintType: 'Performance-Related',
    severity: 'Low',
    incidentDate: '2026-04-05',
    description: 'Employee has consistently failed to meet project deadlines over the past quarter. Three major deliverables were submitted late, causing delays in dependent teams. Previous performance improvement discussions have not yielded improvement.',
    witnesses: undefined,
    evidenceFiles: [{ name: 'performance_review_q1.pdf', size: '1.5 MB', type: 'pdf' }],
    isConfidential: false,
    createdBy: 'Alice Odhiambo',
    createdByRole: 'HOD',
    createdAt: '2026-04-05T09:15:00',
  },
  {
    id: '8',
    caseNumber: 'DC-2026-008',
    employeeName: 'Grace Wanjiku',
    employeeId: 'UF-0005',
    department: 'Procurement',
    complaintType: 'Fraud/Theft',
    severity: 'High',
    incidentDate: '2026-04-08',
    description: 'Employee allegedly manipulated procurement records to favor a specific vendor. Internal audit discovered discrepancies in three tender evaluations. Vendor in question has been linked to a family member of the employee.',
    witnesses: 'John Mutua',
    evidenceFiles: [{ name: 'audit_findings.pdf', size: '4.2 MB', type: 'pdf' }, { name: 'tender_records.docx', size: '2.1 MB', type: 'docx' }],
    isConfidential: true,
    createdBy: 'James Otieno',
    createdByRole: 'HR',
    createdAt: '2026-04-08T10:00:00',
  },
  {
    id: '9',
    caseNumber: 'DC-2026-009',
    employeeName: 'Samuel Kipchoge',
    employeeId: 'UF-0006',
    department: 'Transport',
    complaintType: 'Attendance/Tardiness',
    severity: 'Low',
    incidentDate: '2026-04-12',
    description: 'Employee has been absent without official leave (AWOL) for 3 consecutive days. No communication received from employee. Supervisor attempted to contact employee via phone and email without success.',
    witnesses: undefined,
    evidenceFiles: [{ name: 'attendance_log_april.pdf', size: '320 KB', type: 'pdf' }],
    isConfidential: false,
    createdBy: 'David Njoroge',
    createdByRole: 'HOD',
    createdAt: '2026-04-12T08:30:00',
  },
  {
    id: '10',
    caseNumber: 'DC-2026-010',
    employeeName: 'Fatuma Hassan',
    employeeId: 'UF-0007',
    department: 'Monitoring & Evaluation',
    complaintType: 'Other',
    severity: 'Low',
    incidentDate: '2026-04-14',
    description: 'Employee was found using company resources (printer, internet, and office supplies) for personal business activities during working hours. Evidence includes printed materials for a personal business and browser history showing non-work-related activity.',
    witnesses: 'Esther Njeri',
    evidenceFiles: [{ name: 'evidence_photos.jpg', size: '1.8 MB', type: 'jpg' }],
    isConfidential: false,
    createdBy: 'Grace Wanjiku',
    createdByRole: 'HR',
    createdAt: '2026-04-14T13:45:00',
  },
];

export const complaintTypes: ComplaintType[] = [
  'Attendance/Tardiness',
  'Insubordination',
  'Harassment',
  'Fraud/Theft',
  'Safety Violation',
  'Confidentiality Breach',
  'Performance-Related',
  'Other',
];

export const departments = [
  'Finance', 'ICT', 'Operations', 'Customer Service', 'Procurement',
  'Human Resources', 'Legal', 'Administration', 'Monitoring & Evaluation',
  'Corporate Communication', 'Transport',
];

export const employees = [
  { name: 'John Kamau', id: 'UF-0042', dept: 'Finance' },
  { name: 'Mary Akinyi', id: 'UF-0017', dept: 'Customer Service' },
  { name: 'Paul Nderitu', id: 'UF-0031', dept: 'Operations' },
  { name: 'Alice Mwenda', id: 'UF-0055', dept: 'ICT' },
  { name: 'David Ochieng', id: 'UF-0028', dept: 'Procurement' },
  { name: 'Grace Wanjiku', id: 'UF-0005', dept: 'Procurement' },
  { name: 'James Otieno', id: 'UF-0019', dept: 'Human Resources' },
  { name: 'Diana Ochieng', id: 'UF-0023', dept: 'Human Resources' },
  { name: 'Peter Mwangi', id: 'UF-0038', dept: 'Finance' },
  { name: 'Sarah Njoroge', id: 'UF-0044', dept: 'Finance' },
  { name: 'Lucy Wambua', id: 'UF-0016', dept: 'Customer Service' },
  { name: 'Samuel Maina', id: 'UF-0033', dept: 'Operations' },
  { name: 'Tom Njuguna', id: 'UF-0051', dept: 'ICT' },
  { name: 'Kevin Mutua', id: 'UF-0027', dept: 'Procurement' },
  { name: 'Jane Atieno', id: 'UF-0026', dept: 'Procurement' },
  { name: 'Michael Kariuki', id: 'UF-0048', dept: 'ICT' },
  { name: 'Nancy Wanjau', id: 'UF-0029', dept: 'Procurement' },
  { name: 'Robert Omondi', id: 'UF-0041', dept: 'Administration' },
  { name: 'Esther Njeri', id: 'UF-0011', dept: 'Monitoring & Evaluation' },
  { name: 'Brian Omondi', id: 'UF-0012', dept: 'ICT' },
  { name: 'Samuel Kipchoge', id: 'UF-0006', dept: 'Transport' },
  { name: 'Fatuma Hassan', id: 'UF-0007', dept: 'Monitoring & Evaluation' },
  { name: 'David Njoroge', id: 'UF-0004', dept: 'Transport' },
  { name: 'Alice Odhiambo', id: 'UF-0009', dept: 'ICT' },
  { name: 'Robert Kariuki', id: 'UF-0010', dept: 'Corporate Communication' },
  { name: 'John Mutua', id: 'UF-0008', dept: 'Procurement' },
];

export const UWEZO_GREEN = '#B22698';
export const UWEZO_YELLOW = '#FFC107';
export const UWEZO_DARK = '#212121';
