import * as r from "react";
const {
  isValidElement: o
} = r;
function c(n) {
  return n && o(n) && n.type === r.Fragment;
}
function u(n, t, e) {
  return o(n) ? /* @__PURE__ */ r.cloneElement(n, typeof e == "function" ? e(n.props || {}) : e) : t;
}
function f(n, t) {
  return u(n, n, t);
}
export {
  f as cloneElement,
  c as isFragment,
  o as isValidElement,
  u as replaceElement
};
