import { MouseEventHandler } from "react"; export interface TopRoutesProps { selectedRoute: RouteType handleSelectRoute: any } /** Optional localized UI labels for the TruckRates flow; English fallbacks used per-field when omitted. */ export interface TruckRatesTranslatedWords { transportTruckRates?: string truckFreightCalculator?: string rateHistory?: string from?: string to?: string sourceCity?: string destinationCity?: string searchCityPlaceholder?: string loadMore?: string noMoreData?: string noData?: string ton?: string average?: string ratePerTon?: string tonAbbrev?: string minAbbrev?: string maxAbbrev?: string avgAbbrev?: string ratePerTonAbbrev?: string graph?: string history?: string open?: string container?: string imShipper?: string imTruckOwner?: string bookTruckLorry?: string findLoad?: string bookTruck?: string getFullExperience?: string downloadApp?: string continueWithMobileWeb?: string } export type RouteType = { p: number transport_service: string sAliasId: number[] | null, sourceId: number, sourceBranchId: number, sourceName: string, dAliasId: number[] | null, destinationId: number, destinationBranchId: number, destinationName: string } export type RateData = { created_at: string, customer_price: number, ton: number } export interface TruckRatesProps { initialRoute: RouteType onTruckGroupSelect:Function onRouteChange: Function priceRange?: { ton: number, rounded_avg_rate:number } cityPriceData: TripCustomerPrice[] | [] hasLoadMore:boolean loadMore: any priceLoading?: boolean tripsLoading: boolean showBookLink?: boolean utmSource?: string, onPeriodChange?: Function rateData?: RateData[] showGraph: boolean translatedWords?: TruckRatesTranslatedWords } export interface SourceDestinationType { count: number, source_id: number, source: CityType, destination_id: number, destination: CityType } export interface SourceDestinationState { source_id: number | null, source: CityType | null, destination_id: number | null, destination: CityType | null alias: AliasType | null } interface CityType { id: number, branch_id: number, name: string, hi?: string, ta?: string, kn?: string, alias?: AliasType } interface AliasType { id: number[], name?: string, hi?: string, ta?: string, kn?: string } export interface TruckTypePrimaryGroup { id: number name: string truck_type: TruckType[] } export interface TruckType { id: number name: string truck_type_group_id: number } export interface RateProps { setPrimaryGroupId: any route: RouteType } export interface TripCustomerPrice { id: number created_at: string customer_price: number source_name: string source_id: number branch_id: number destination_name: string destination_id: number destination_branch_id: number ton: number truck_type: ITruckType } export interface ITruckType { id: number web_name: string } interface IRateByTruckGroup { cityPriceData: TripCustomerPrice[], hasLoadMore: boolean, loading: boolean, loadMore: any | MouseEventHandler showBookLink?: boolean utmSource?: string showRatePerTon: boolean translatedWords?: TruckRatesTranslatedWords } export interface ICity{ id: number, city: string, state: string, branch_id: number, count: number, alias: AliasType | null }