import { RtTooltipProps } from '../rt-tooltip.types'; const mapAligmentLabels: Record< NonNullable, 'left' | 'middle' | 'right' > = { start: 'left', middle: 'middle', end: 'right', }; export const getLabelsAlign = ( position: 'bottom' | 'top' | 'left' | 'right', aligment: RtTooltipProps['alignment'] = 'middle' ): 'left' | 'middle' | 'right' => { if (position === 'left' || position === 'right') { return position; } return mapAligmentLabels[aligment]; };