import { createCustomCachedSelector } from '../../../../state/create_selector' ; import { getHeatmapGeometries } from './geometries' ; import { getHeatmapSpecSelector } from './get_heatmap_spec' ; import { isBrushingSelector } from './is_brushing' ; internal export const getHighlightedDataSelector = createCustomCachedSelector ( [ getHeatmapSpecSelector , isBrushingSelector ] , ( spec , isBrushing ) => { if ( ! spec . highlightedData || isBrushing ) { return null ; } return spec . highlightedData ; } ) ; internal export const getHighlightedAreaSelector = createCustomCachedSelector ( [ getHeatmapGeometries , getHeatmapSpecSelector , isBrushingSelector ] , ( geoms , spec , isBrushing ) => { if ( ! spec . highlightedData || isBrushing ) { return null ; } return geoms . pickHighlightedArea ( spec . highlightedData . x , spec . highlightedData . y ) ; } ) ;