import p from "../../../@babel/runtime/helpers/esm/toConsumableArray.mjs";
import v from "../../../rc-util/es/Children/toArray.mjs";
import * as i from "react";
function c(m, f) {
  return v(m).map(function(r, e) {
    if (/* @__PURE__ */ i.isValidElement(r)) {
      var n, a, l = r.key, o = (n = (a = r.props) === null || a === void 0 ? void 0 : a.eventKey) !== null && n !== void 0 ? n : l, t = o == null;
      t && (o = "tmp_key-".concat([].concat(p(f), [e]).join("-")));
      var u = {
        key: o,
        eventKey: o
      };
      return process.env.NODE_ENV !== "production" && t && (u.warnKey = !0), /* @__PURE__ */ i.cloneElement(r, u);
    }
    return r;
  });
}
export {
  c as parseChildren
};
