import { DEFAULT_TOOLTIP_SNAP } from '../../../../specs/constants' ; import { SettingsSpec , isTooltipProps } from '../../../../specs/settings' ; import { createCustomCachedSelector } from '../../../../state/create_selector' ; import { getSettingsSpecSelector } from '../../../../state/selectors/get_settings_specs' ; internal export const getTooltipSnapSelector = createCustomCachedSelector ( [ getSettingsSpecSelector ] , getTooltipSnap ) ; function getTooltipSnap ( settings ) { const { tooltip } = settings ; return tooltip && isTooltipProps ( tooltip ) ? tooltip . snap ?? DEFAULT_TOOLTIP_SNAP : DEFAULT_TOOLTIP_SNAP ; }