import type { TripDocument } from './schemas/trip.schema';
import type { AddNextClientDto } from './dto/add-next-client.dto';
export type TripLegRecord = Record<string, unknown>;
export declare function punchFromDto(dto: {
    timestamp: string;
    latitude: number;
    longitude: number;
    address?: string;
}, flutterType: string): {
    type: string;
    time: string;
    latitude: number;
    longitude: number;
    address: string | null;
};
export declare function findActiveLegIndex(legs: TripLegRecord[]): number;
export declare function hasPunch(leg: TripLegRecord, key: string): boolean;
export declare function isLegComplete(leg: TripLegRecord): boolean;
export declare function legPunchesLookLeaked(leg: TripLegRecord, previous: TripLegRecord): boolean;
export declare function ensureTripLegs(trip: TripDocument, punches?: Record<string, unknown>[]): TripLegRecord[];
export declare function assertCanAddNextClient(legs: TripLegRecord[]): void;
export declare function addNextClientLeg(trip: TripDocument, dto: AddNextClientDto, punches?: Record<string, unknown>[]): TripLegRecord[];
export declare function assertCanStartReturnTrip(legs: TripLegRecord[]): void;
export declare function addReturnLeg(trip: TripDocument, punches?: Record<string, unknown>[]): TripLegRecord[];
export declare function syncTripTopLevelFromLegs(trip: TripDocument, legs: TripLegRecord[]): void;
