/**
 * @ai-summary TypeScript types for email ingestion frontend feature
 */

export type EmailRecordType = 'fuel_log' | 'maintenance_record';

export type PendingAssociationStatus = 'pending' | 'resolved' | 'expired';

export interface ExtractedReceiptData {
  vendor: string | null;
  date: string | null;
  total: number | null;
  odometerReading: number | null;
  gallons: number | null;
  pricePerGallon: number | null;
  fuelType: string | null;
  category: string | null;
  subtypes: string[] | null;
  shopName: string | null;
  description: string | null;
}

export interface PendingVehicleAssociation {
  id: string;
  userId: string;
  recordType: EmailRecordType;
  extractedData: ExtractedReceiptData;
  documentId: string | null;
  status: PendingAssociationStatus;
  createdAt: string;
  resolvedAt: string | null;
}

export interface PendingAssociationCount {
  count: number;
}

export interface ResolveAssociationResult {
  recordId: string;
  recordType: EmailRecordType;
}
