const TOP = "_top";
const BLANK = "_blank";
const convertRelObjectToString = (rel) => `${rel?.nofollow ? "nofollow " : ""}${rel?.sponsored ? "sponsored " : ""}${rel?.ugc ? "ugc " : ""}${rel?.noreferrer ? "noreferrer" : ""}`.trim();
const convertRelStringToObject = (rel) => ({
  nofollow: rel?.includes("nofollow"),
  sponsored: rel?.includes("sponsored"),
  ugc: rel?.includes("ugc"),
  noreferrer: rel?.includes("noreferrer")
});
const convertTargetStringToBoolean = (target) => target === BLANK;
const convertTargetBooleanToString = (targetBlank) => targetBlank ? BLANK : TOP;
const getRelValue = (rel) => `noopener noreferrer ${rel || ""}`.trim();
export {
  convertRelObjectToString,
  convertRelStringToObject,
  convertTargetBooleanToString,
  convertTargetStringToBoolean,
  getRelValue
};
//# sourceMappingURL=link-converters.js.map
