"use client"; import { useRouter } from "next/navigation"; import { Icon } from "@/components/Icons"; type Props = { routes: { route_id: string; name_th: string }[]; current: string; /** คืน URL ปลายทางเมื่อเลือกสาย (default: /routes/:id) */ to?: (routeId: string) => string; }; /** เลือกสายรถ — เปลี่ยนสายโดยไม่ต้องกลับหน้ารายการ (จาก design: route-select) */ export function RouteSelect({ routes, current, to }: Props) { const router = useRouter(); return (