var valueConstraints = {
  min: 0,
  max: 5
};
var helperTextPlacements = {
  inner: 'inner',
  outer: 'outer'
};
var getHelperTextPlacement = function getHelperTextPlacement(value, size, hasIcons, iconQuantity) {
  if (!value || !size || !hasIcons) {
    return helperTextPlacements.outer;
  }
  if (size.includes('display') && iconQuantity !== 1) {
    return helperTextPlacements.inner;
  }
  return helperTextPlacements.outer;
};
var getInnerValue = function getInnerValue(value, precision) {
  var iconQuantity = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 5;
  var innerValue = value ? String(value) : '';
  if (value && value > iconQuantity) {
    innerValue = iconQuantity === 1 ? String(value) : String(iconQuantity);
  }
  if (value && value < valueConstraints.min) {
    innerValue = String(valueConstraints.min);
  }
  if (precision !== undefined) {
    innerValue = Number(innerValue).toFixed(precision);
  }
  return innerValue;
};
var getDisplayValue = function getDisplayValue(innerValue) {
  var decimalSeparator = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '.';
  if (decimalSeparator === '.') {
    return innerValue;
  }
  return innerValue.replace('.', decimalSeparator);
};

export { getDisplayValue, getHelperTextPlacement, getInnerValue, helperTextPlacements, valueConstraints };
