/**
 * Closed Requests TypeScript interfaces
 */

export interface ClosedRequest {
  id: string;
  requestId: string;
  displayId?: string;
  title: string;
  description: string;
  status: 'rejected' | 'closed';
  priority: 'express' | 'standard';
  initiator: { name: string; avatar: string };
  createdAt: string;
  dueDate?: string;
  reason?: string;
  department?: string;
  totalLevels?: number;
  completedLevels?: number;
  templateType?: string; // Template type for badge display
  /** Form 16: dealer code, form16a number, FY, quarter, totalAmount, creditNoteNumber, displayStatus */
  form16Submission?: {
    dealerCode?: string;
    form16aNumber?: string;
    financialYear?: string;
    quarter?: string;
    status?: string;
    submittedDate?: string;
    totalAmount?: number | null;
    creditNoteNumber?: string | null;
    displayStatus?: string;
  } | null;
}

export interface ClosedRequestsProps {
  onViewRequest?: (requestId: string, requestTitle?: string) => void;
}

export interface ClosedRequestsFilters {
  search: string;
  status: string;
  priority: string;
  templateType?: string;
  financialYear?: string;
  quarter?: string;
  sortBy: 'created' | 'due' | 'priority';
  sortOrder: 'asc' | 'desc';
}

export interface PaginationState {
  currentPage: number;
  totalPages: number;
  totalRecords: number;
  itemsPerPage: number;
}

export interface PriorityConfig {
  color: string;
  icon: React.ComponentType<{ className?: string }>;
  iconColor: string;
}

export interface StatusConfig {
  color: string;
  icon: React.ComponentType<{ className?: string }>;
  iconColor: string;
  label: string;
  description: string;
}

