import { Decoration_Type } from "./../../ricos-schema/legacy/wix/rich_content/v1/index.js";
const isLinkPreviewEnabled = (content, _services, editor) => {
  if (editor?.commands.createLinkPreview) {
    const node = content.find((node2) => node2.type.name === "text");
    const linkMark = node?.marks.find((mark) => mark.type.name === Decoration_Type.LINK);
    if (!linkMark) {
      return false;
    }
    return !!linkMark.attrs?.link?.url;
  }
  return false;
};
export {
  isLinkPreviewEnabled
};
//# sourceMappingURL=is-link-preview-enabled.js.map
