import React from 'react';
export function reactGetTextContent(rootReactNode) {
  var result = '';
  var getText = function getText(reactNode) {
    if (typeof reactNode === 'string' || typeof reactNode === 'number') {
      result += reactNode.toString();
    } else if (Array.isArray(reactNode)) {
      reactNode.forEach(function (node) {
        return getText(node);
      });
    } else if ( /*#__PURE__*/React.isValidElement(reactNode) && reactNode.props) {
      var children = reactNode.props.children;
      getText(children);
    }
  };
  getText(rootReactNode);
  return result;
}