import type { AssignmentRoleHint, BookingDraftTraveler, PricingAssignmentUnit, TravelerRole } from "./types.js"; /** * Compute integer age in full years from an ISO date-of-birth string. * Returns null when the DOB is missing or unparseable. */ export declare function computeAgeYears(dob: string | null, now?: Date): number | null; /** * Derive the age-banded traveler category from DOB + role hint. * DOB-derived age wins; role hint is the fallback for travelers * added before the operator filled in a birthday. */ export declare function deriveDraftPaxBand(traveler: Pick, now?: Date): "adult" | "child" | "infant" | null; /** * Pick the unit for a traveler pricing band. Priorities: * 1. DOB-derived age that falls into a unit's `[minAge, maxAge]` * 2. Role hint mapped to a representative age (infant→1, child→8, * adult→30) matched against bands. Works for products coded * `child_0_5` / `child_6_12` (not just literal `INFANT`/`CHILD`). * 3. Code/name matching for legacy products with no min/max set. */ export declare function pickUnitForAge(units: ReadonlyArray, age: number | null, roleHint?: AssignmentRoleHint | null): TUnit | undefined; /** * Find the unit whose `[minAge, maxAge]` contains the DOB-derived * age. Used by the UI to pre-pick a unit when a traveler attaches. */ export declare function matchUnitByDob(units: ReadonlyArray, dob: string | null): string | null; /** * Find the unit matching a role hint when DOB is missing. Same * HINT_AGE mapping as `pickUnitForAge`. Returns null when the role * carries no age signal (e.g. `lead`). */ export declare function matchUnitByRoleHint(units: ReadonlyArray, role: TravelerRole | null): string | null;