import { useStore } from '../store' /** Format seconds into human-friendly string */ function formatTime(seconds) { if (seconds < 60) return `${Math.round(seconds)}s` if (seconds < 3600) return `${Math.round(seconds / 60)} min` const h = Math.floor(seconds / 3600) const m = Math.round((seconds % 3600) / 60) return m > 0 ? `${h}h ${m}m` : `${h}h` } /** Format distance in miles */ function formatDist(miles) { if (miles < 0.1) return `${Math.round(miles * 5280)} ft` return `${miles.toFixed(1)} mi` } /** Get a maneuver type icon */ function maneuverIcon(type) { switch (type) { case 0: return '→' // straight case 1: return '↗' // slight right case 2: return '→' // right case 3: return '↘' // sharp right case 4: return '↩' // u-turn right case 5: return '↩' // u-turn left case 6: return '↙' // sharp left case 7: return '←' // left case 8: return '↖' // slight left case 9: return '●' // depart case 10: return '●' // arrive (straight) case 11: return '●' // arrive (right) case 12: return '●' // arrive (left) case 15: return '◎' // roundabout enter case 16: return '◎' // roundabout exit case 24: return '▲' // merge case 25: return '⤴' // on ramp case 26: return '⤵' // off ramp default: return '→' } } export default function ManeuverList({ onManeuverClick }) { const route = useStore((s) => s.route) const routeLoading = useStore((s) => s.routeLoading) const routeError = useStore((s) => s.routeError) if (routeLoading) { return (