import React, { useContext } from "react";
import { ContentTraverserContext, withRicosNodeContext } from "./../../../../../ricos-context/index.js";
const Text = ({ node }) => {
  const { text } = node.textData || {};
  const { nodeViewDecorators } = useContext(ContentTraverserContext);
  if (text && text !== "") {
    return /* @__PURE__ */ React.createElement("span", null, nodeViewDecorators.applyTextual(node) || text);
  }
  return /* @__PURE__ */ React.createElement("br", { role: "presentation" });
};
const TextRenderer = (props) => {
  const { parentId, nodeIndex } = props;
  const key = `${parentId}-text-node-${nodeIndex}`;
  return /* @__PURE__ */ React.createElement(Text, { key, ...props });
};
var text_default = withRicosNodeContext(TextRenderer);
export {
  text_default as default
};
//# sourceMappingURL=text.js.map
