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