import React, { Suspense } from "react";
import { Node_Type } from "./../../ricos-types/index.js";
const LinkPreview = React.lazy(
  () => import(
    /* webpackChunkName: "ricos_plugin_linkPreview_lazy" */
    "./link-preview.js"
  )
);
const LinkPreviewRenderer = ({
  node,
  nodeIndex,
  NodeViewContainer,
  ...props
}) => {
  return /* @__PURE__ */ React.createElement(
    LinkPreview,
    {
      key: node.id,
      node,
      nodeIndex,
      NodeViewContainer,
      ...props
    }
  );
};
const LinkPreviewLazy = ({ node, ...props }) => {
  return /* @__PURE__ */ React.createElement(Suspense, { fallback: "" }, /* @__PURE__ */ React.createElement(LinkPreviewRenderer, { key: node.id, node, ...props }));
};
const Embed = React.lazy(
  () => import(
    /* webpackChunkName: "ricos_plugin_linkPreview_embed_lazy" */
    "./embed.js"
  )
);
const EmbedRenderer = ({
  node,
  nodeIndex,
  NodeViewContainer,
  ...props
}) => {
  return /* @__PURE__ */ React.createElement(
    Embed,
    {
      key: node.id,
      node,
      nodeIndex,
      NodeViewContainer,
      ...props
    }
  );
};
const EmbedRendererLazy = ({ node, ...props }) => {
  return /* @__PURE__ */ React.createElement(Suspense, { fallback: "" }, /* @__PURE__ */ React.createElement(EmbedRenderer, { key: node.id, node, ...props }));
};
const nodeViewRenderers = {
  [Node_Type.LINK_PREVIEW]: LinkPreviewLazy,
  [Node_Type.EMBED]: EmbedRendererLazy
};
export {
  nodeViewRenderers
};
//# sourceMappingURL=node-view-renderers-lazy.js.map
