import o from "react";
import { r as s } from "../../node_modules/react-is/index.mjs";
function n(a) {
  var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, e = [];
  return o.Children.forEach(a, function(r) {
    r == null && !t.keepEmpty || (Array.isArray(r) ? e = e.concat(n(r)) : s.isFragment(r) && r.props ? e = e.concat(n(r.props.children, t)) : e.push(r));
  }), e;
}
export {
  n as default
};
