import type { Option } from '@/types/data-table';

export interface EmployeeDirectoryFilters {
  page?: number;
  limit?: number;
  search?: string;
  company?: string;
  department?: string;
  position?: string;
  status?: string;
  sort?: string;
}

export interface EmployeeDirectoryListItem {
  id: number;
  employee_code: string;
  full_name: string;
  email: string | null;
  company_name: string | null;
  department_name: string | null;
  position_name: string | null;
  is_active: boolean;
  approved_hours: number;
  pending_hours: number;
  rejected_hours: number;
  total_hours: number;
}

export interface EmployeeDirectoryResponse {
  success: boolean;
  time: string;
  message: string;
  total_employees: number;
  offset: number;
  limit: number;
  employees: EmployeeDirectoryListItem[];
  options: {
    companies: Option[];
    departments: Option[];
    positions: Option[];
    statuses: Option[];
  };
}

export interface EmployeeTargetFormData {
  employeeId: number;
  employeeName: string;
  employeeCode: string;
  year: number;
  totalHours: number;
  kHours: number;
  sHours: number;
  aHours: number;
  source: 'employee' | 'policy' | 'default';
}

export interface EmployeeTargetMutationPayload {
  year: number;
  totalHours: number;
  kHours: number;
  sHours: number;
  aHours: number;
}

export interface EmployeeTargetResponse {
  success: boolean;
  time: string;
  message: string;
  target: EmployeeTargetFormData;
}
