import * as n from "react";
import { isReactVersionAtLeast as o } from "./reactVersion.js";
function c(e) {
  if (!/* @__PURE__ */ n.isValidElement(e))
    return null;
  const r = e, t = r.props;
  return (o(19) ? t == null ? void 0 : t.ref : r.ref) ?? null;
}
export {
  c as getReactElementRef
};
