import { PendingLeaveApproval } from './LeaveApproval';

export interface DashboardOnLeaveEmployee {
  employee: {
    employee_id: string;
    firstname?: string;
    lastname?: string;
    position?: string | null;
  };
  leave_type: {
    name?: string;
    color_code?: string | null;
  };
  start_date: string;
  end_date: string;
  total_days: number;
}

export interface LeaveByTypeYear {
  leave_type: string;
  color?: string | null;
  count: number;
  days: number;
}

export interface MonthlyTrendPoint {
  month: string;
  approved: number;
  rejected: number;
  pending: number;
}

export interface LeaveDashboardData {
  overview: {
    total_employees: number;
    on_leave_today: number;
    pending_requests: number;
    pending_my_approval: number;
    approved_this_month: number;
    rejected_this_month: number;
  };
  on_leave_today: DashboardOnLeaveEmployee[];
  pending_approvals: PendingLeaveApproval[];
  leave_by_type_this_year: LeaveByTypeYear[];
  monthly_trend: MonthlyTrendPoint[];
}
