import { SeriesRef , TargetList , NotifyPointerMoveFn , ProcessedTarget } from '../types' ; const compareTargets = ( target1 , target2 ) => ( target1 . series === target2 . series && target1 . point === target2 . point ) ; const selectTarget = ( targets , currentTarget ) : ProcessedTarget => { const candidate = targets [ 0 ] ; if ( ! currentTarget ) { return candidate ; } if ( ! candidate ) { return null ; } return compareTargets ( candidate , currentTarget ) ? undefined : candidate ; } ; internal export const processPointerMove = ( targets , currentTarget , notify ? ) => { const nextTarget = selectTarget ( targets , currentTarget ) ; if ( nextTarget === undefined ) { return undefined ; } if ( notify ) { notify ( nextTarget ) ; } return nextTarget ; } ;