import { GlobalChartState } from '../../../../state/chart_state' ; import { createCustomCachedSelector } from '../../../../state/create_selector' ; import { DragShape } from '../../layout/types/viewmodel_types' ; import { getHeatmapGeometries } from './geometries' ; function getCurrentPointerStates ( state ) { return state . interactions . pointer ; } internal export const getBrushedHighlightedShapesSelector = createCustomCachedSelector ( [ getHeatmapGeometries , getCurrentPointerStates ] , ( geoms , pointerStates ) : DragShape => { if ( ! pointerStates . dragging || ! pointerStates . down ) { return null ; } return geoms . pickDragShape ( [ pointerStates . down . position , pointerStates . current . position ] ) ; } ) ;