const isUndefined = (val) => val === void 0;
const isDefined = (val) => !isUndefined(val);
const validate = ({ targetBlank, nofollow, target, rel }) => isUndefined(targetBlank) && isUndefined(nofollow) && isDefined(target) && isDefined(rel);
const linkDataNormalizer = (componentData, { anchorTarget, relValue }) => {
  const { targetBlank, nofollow, ...rest } = componentData;
  if (validate(componentData)) {
    return componentData;
  }
  return {
    target: targetBlank ? "_blank" : anchorTarget,
    rel: nofollow ? "nofollow" : relValue,
    ...rest
  };
};
export {
  linkDataNormalizer
};
//# sourceMappingURL=link-data-normalizer.js.map
