import { ReactNode } from 'react' ; import { SearchParams } from 'utils/VisibleNodesGenerator' ; import { fuzzyMode } from './fuzzyMode' ; import { regexMode } from './regexMode' ; export type SearchMode = 'regex' | 'fuzzy' ; export type ModeShape = { getSearchParams ( searchKey ) : Pick < SearchParams , 'matchNode' > | null ; renderNodeLabelText ( node , searchKey ) : ReactNode ; } ; export const searchModes = { regex : regexMode , fuzzy : fuzzyMode , } ;