'use client'; import { useRouter } from 'next/navigation'; import type { GraphExploreMode } from '@/lib/types'; import { defaultModeFor, graphHref } from './modes'; import { NodeSearch as Search } from './node-search'; /** Standalone root picker that navigates to `/graph?node=` (empty / not-found states of the graph pages). */ export function NodeSearch({ mode, depth }: { mode?: GraphExploreMode; depth?: 1 | 2 }) { const router = useRouter(); return router.push(graphHref(s.slug, mode ?? defaultModeFor(s.entity_type), depth ?? 1))} />; }