import { Link_Target } from "./../../ricos-schema/next-schema/index.js";
const fromTiptapLinkConverter = (link) => {
  if (!link) {
    return void 0;
  }
  if (link.anchor) {
    return {
      anchor: link.anchor
    };
  }
  if (link.url) {
    return {
      url: link.url,
      target: link.target ?? Link_Target.BLANK,
      rel: link.rel,
      customData: link.customData
    };
  }
  return void 0;
};
export {
  fromTiptapLinkConverter
};
//# sourceMappingURL=link-converters.js.map
