import { isValidElement as o } from "react";
const e = (t) => {
  if (!(t == null || typeof t == "boolean")) {
    if (typeof t == "string" || typeof t == "number" || typeof t == "bigint")
      return String(t);
    if (Array.isArray(t)) {
      const r = t.map(e).filter((n) => typeof n == "string" && n.length > 0);
      return r.length > 0 ? r.join(" ") : void 0;
    }
    if (o(t)) {
      const r = e(t.props.children);
      if (r)
        return r;
      if (typeof t.props.defaultMessage == "string" && t.props.defaultMessage.length > 0)
        return t.props.defaultMessage;
    }
  }
};
export {
  e as getNodeTextContent
};
//# sourceMappingURL=getNodeTextContent.js.map
