import { calculateThumbPosition, calculateOffset } from '../../helpers/get-range-tick.js';

const baseClass = 'euiRangeLevels';
function inlineStyles({
  min,
  max,
  level,
  trackWidth
}) {
  const left = level.min === min ? 0 : calculateThumbPosition(level.min, min, max, trackWidth);
  const right = level.max === max ? 100 : calculateThumbPosition(level.max, min, max, trackWidth);
  const leftOffset = calculateOffset(left, level.min, min);
  const rightOffset = calculateOffset(right, level.max, max);
  return {
    left: `calc(${left}% + ${leftOffset}px)`,
    right: `calc(${100 - right}% - ${rightOffset}px)`
  };
}
const mapping = {
  base: baseClass,
  properties: {},
  inlineStyles
};

export { baseClass, mapping as default, inlineStyles };
//# sourceMappingURL=eui-range-levels.js.map
