import { Selector } from 'react-redux' ; import { ChartType } from '../../..' ; import { getOnElementOutSelector } from '../../../../common/event_handler_selectors' ; import { GlobalChartState } from '../../../../state/chart_state' ; import { createCustomCachedSelector } from '../../../../state/create_selector' ; import { getSettingsSpecSelector } from '../../../../state/selectors/get_settings_specs' ; import { getPickedShapesLayerValues } from './picked_shapes' ; import { getSpecOrNull } from './wordcloud_spec' ; internal export function createOnElementOutCaller ( ) { const prev = { pickedShapes : null } ; let selector = null ; return ( state ) => { if ( selector === null && state . chartType === ChartType . Wordcloud ) { selector = createCustomCachedSelector ( [ getSpecOrNull , getPickedShapesLayerValues , getSettingsSpecSelector ] , getOnElementOutSelector ( prev ) ) ; } if ( selector ) { selector ( state ) ; } } ; }