import loadable from "@loadable/component";
import React, { useMemo } from "react";
import { Node_Type } from "./../../../ricos-types/index.js";
const ShapeRenderer = ({
  node,
  nodeIndex,
  NodeViewContainer,
  ...props
}) => {
  const ViewerShape = useMemo(
    () => loadable(() => import(
      /* webpackChunkName: "ricos_plugin_shape" */
      "../viewer-shape.js"
    )),
    []
  );
  return /* @__PURE__ */ React.createElement(
    ViewerShape,
    {
      key: node.id,
      node,
      nodeIndex,
      NodeViewContainer,
      ...props
    }
  );
};
const ShapeLoadable = ({ node, ...props }) => {
  return /* @__PURE__ */ React.createElement(ShapeRenderer, { key: node.id, node, ...props });
};
const nodeViewRenderers = {
  [Node_Type.SHAPE]: ShapeLoadable
};
export {
  nodeViewRenderers
};
//# sourceMappingURL=node-view-renderers-loadable.js.map
