import { type PathFindingAlgorithm } from 'mudlet-map-renderer'; import type { MudletMap } from '../mapIO'; import type { EditorMapReader } from './reader/EditorMapReader'; export type { PathFindingAlgorithm }; export type RouteStep = { /** Room you leave from. */ fromId: number; /** Room you arrive at. */ toId: number; /** Speedwalk command — short cardinal (n, ne, up…) or the special-exit name. */ token: string; /** Whether this hop is a cardinal exit or a named special exit. */ kind: 'cardinal' | 'special'; /** Edge weight A* / Dijkstra paid for this hop. */ weight: number; }; export type RouteSummary = { /** Room-id sequence start→end (length = steps + 1). */ path: number[]; steps: RouteStep[]; /** Sum of edge weights along the path. */ totalWeight: number; /** Semicolon-joined command string, e.g. "n;n;ne;up". */ speedwalk: string; }; /** * Find the lowest-cost route between two rooms using the renderer's pathfinder * (respects exit/room weights, locked exits, and locked special exits) and * summarise it into a speedwalk string + per-hop steps. Returns null when either * endpoint is missing or no route exists. * * A fresh PathFinder is built per call: it snapshots the graph in its constructor, * and the editor mutates the map constantly, so reusing one would go stale. */ export declare function findRoute(reader: EditorMapReader, map: MudletMap, fromId: number, toId: number, algorithm?: PathFindingAlgorithm): RouteSummary | null;