/**
 * Rate Search Types
 *
 * TypeScript types for rate search functionality
 */

/**
 * CSV Rate Search Request
 */
export interface CsvRateSearchRequest {
  origin: string;
  destination: string;
  volumeCBM: number;
  weightKG: number;
  palletCount?: number;
  containerType?: string;
  hasDangerousGoods?: boolean;
  requiresSpecialHandling?: boolean;
  requiresTailgate?: boolean;
  requiresStraps?: boolean;
  requiresThermalCover?: boolean;
  hasRegulatedProducts?: boolean;
  requiresAppointment?: boolean;
}

/**
 * Surcharge Details
 */
export interface Surcharge {
  code: string;
  description: string;
  amount: number;
  type: string;
}

/**
 * Price Breakdown
 */
export interface PriceBreakdown {
  basePrice: number;
  volumeCharge: number;
  weightCharge: number;
  palletCharge: number;
  surcharges: Surcharge[];
  totalSurcharges: number;
  totalPrice: number;
  currency: string;
}

/**
 * CSV Rate Search Result
 */
export interface CsvRateSearchResult {
  companyName: string;
  companyEmail: string;
  origin: string;
  destination: string;
  containerType: string;
  priceUSD: number;
  priceEUR: number;
  primaryCurrency: string;
  priceBreakdown: PriceBreakdown;
  hasSurcharges: boolean;
  surchargeDetails: string | null;
  transitDays: number;
  validUntil: string;
  source: string;
  matchScore: number;
}

/**
 * CSV Rate Search Response
 */
export interface CsvRateSearchResponse {
  results: CsvRateSearchResult[];
  totalResults: number;
  searchedFiles: string[];
  searchedAt: Date;
  appliedFilters: Record<string, any>;
}
