/**
 * Multi-segment pathfinding engine using NBA* (bi-directional A*)
 *
 * Builds an ngraph.graph from GlobalRoutes and finds optimal multi-hop
 * paths using bi-directional A* search with configurable edge weights.
 *
 * Key features:
 * - Directed graph traversal (routes are one-directional)
 * - Configurable edge weights (km or minutes)
 * - Carrier preference filtering
 * - Maximum stop limits
 * - Optimized bi-directional search via NBA*
 */
import { z } from "zod";
import type { GlobalRoutes } from "./schema";
/**
 * Configuration for pathfinding search
 */
export declare const PathfindingConfigSchema: z.ZodObject<{
    maxStops: z.ZodDefault<z.ZodNumber>;
    weightBy: z.ZodDefault<z.ZodEnum<{
        min: "min";
        km: "km";
    }>>;
    preferredCarriers: z.ZodOptional<z.ZodArray<z.ZodString>>;
}, z.core.$strip>;
export type PathfindingConfig = z.infer<typeof PathfindingConfigSchema>;
export declare const DEFAULTS: PathfindingConfig;
/**
 * A single leg in a multi-segment itinerary
 */
export interface ItineraryLeg {
    /** Origin airport IATA code */
    origin: string;
    /** Destination airport IATA code */
    destination: string;
    /** Carrier IATA codes operating this leg */
    carriers: string[];
    /** Great-circle distance in kilometers */
    distanceKm: number;
    /** Estimated flight duration in minutes */
    durationMin: number;
}
/**
 * Result of a multi-segment pathfinding search
 */
export interface ItineraryResult {
    /** Ordered list of flight legs */
    legs: ItineraryLeg[];
    /** Total distance across all legs in kilometers */
    totalDistanceKm: number;
    /** Total estimated flight time across all legs in minutes */
    totalDurationMin: number;
    /** Number of stops (legs.length - 1, never negative) */
    totalStops: number;
}
/**
 * Multi-segment pathfinding engine using NBA* (bi-directional A*)
 *
 * Builds an internal ngraph.graph from GlobalRoutes and finds optimal
 * multi-hop paths. The engine is reusable — construct once, query many times.
 *
 * @example
 * ```ts
 * const engine = new PathfindingEngine(routes);
 * const result = engine.findPath("DUB", "ZQN", { maxStops: 4 });
 * if (result) {
 *   console.log(result.legs); // [DUB→LHR, LHR→DXB, DXB→AKL, AKL→ZQN]
 * }
 * ```
 */
export declare class PathfindingEngine {
    private graph;
    private routes;
    private nodeIdSet;
    constructor(routes: GlobalRoutes);
    /**
     * Build ngraph.graph from GlobalRoutes adjacency list.
     *
     * Each airport IATA code becomes a node. Each RouteConnection becomes
     * a directed edge with km, min, and carriers attached as link data.
     * Uses multigraph mode to allow multiple edges between the same pair
     * of nodes (e.g. different carriers on the same route).
     */
    private buildGraph;
    /**
     * Find the optimal multi-segment path between two airports
     *
     * Uses NBA* (bi-directional A*) for optimal shortest-path search with
     * configurable edge weights. Returns the best path found, or null if
     * no valid path exists within the constraints.
     *
     * @param origin - Origin airport IATA code (e.g. "DUB")
     * @param destination - Destination airport IATA code (e.g. "ZQN")
     * @param config - Optional pathfinding configuration overrides
     * @returns Optimal itinerary or null if no path exists
     */
    findPath(origin: string, destination: string, config?: Partial<PathfindingConfig>): ItineraryResult | null;
    /**
     * Build a blocked-edge filter for preferred carriers
     */
    private buildBlockedFilter;
    /**
     * Get the number of airports in the graph
     */
    getAirportCount(): number;
    /**
     * Get the number of directed edges in the graph
     */
    getRouteCount(): number;
}
//# sourceMappingURL=pathfinding.d.ts.map