import { ScaleType } from '../../../../scales/constants' ; import { createCustomCachedSelector } from '../../../../state/create_selector' ; import { getSettingsSpecSelector } from '../../../../state/selectors/get_settings_specs' ; import { getComputedScalesSelector } from './get_computed_scales' ; internal export const isBrushAvailableSelector = createCustomCachedSelector ( [ getSettingsSpecSelector , getComputedScalesSelector ] , ( settingsSpec , scales ) : boolean => scales . xScale . type !== ScaleType . Ordinal && Boolean ( settingsSpec . onBrushEnd ) ) ;