import { useStore } from './useStore'; import type { InternalNode, Node } from '../types'; /** * Hook for getting an internal node by id * * @public * @param id - id of the node * @returns array with visible node ids */ export function useInternalNode(id: string): () => InternalNode | undefined { const node = useStore((s) => () => s.nodeLookup.get(id) as InternalNode | undefined); return node; }