/**
 * Dashboard-specific TypeScript types and interfaces
 */

import { DateRange, DashboardKPIs, CriticalRequest, UpcomingDeadline, DepartmentStats, PriorityDistribution, AIRemarkUtilization, ApproverPerformance } from '@/services/dashboard.service';
import { ActivityData } from '@/components/dashboard/ActivityFeedItem';
import type { CriticalAlertData } from '@/components/dashboard/CriticalAlertCard';

export interface DashboardFilters {
  dateRange: DateRange;
  customStartDate?: Date;
  customEndDate?: Date;
  showCustomDatePicker: boolean;
}

export interface DashboardPagination {
  activity: {
    page: number;
    totalPages: number;
    totalRecords: number;
  };
  critical: {
    page: number;
    totalPages: number;
    totalRecords: number;
  };
  deadlines: {
    page: number;
    totalPages: number;
    totalRecords: number;
  };
  approver: {
    page: number;
    totalPages: number;
    totalRecords: number;
  };
}

export interface DashboardState {
  kpis: DashboardKPIs | null;
  recentActivity: ActivityData[];
  criticalRequests: (CriticalRequest | CriticalAlertData)[];
  departmentStats: DepartmentStats[];
  priorityDistribution: PriorityDistribution[];
  upcomingDeadlines: UpcomingDeadline[];
  aiRemarkUtilization: AIRemarkUtilization | null;
  approverPerformance: ApproverPerformance[];
  loading: boolean;
  refreshing: boolean;
  exportingDeptStats: boolean;
  exportingApproverPerformance: boolean;
}

export interface KPIClickFilters {
  status?: string;
  priority?: string;
  slaCompliance?: string;
  department?: string;
  dateRange?: DateRange;
  startDate?: Date;
  endDate?: Date;
}

