import { composeRef as m } from "../../../../rc-util/es/ref.mjs";
import * as f from "react";
import { FormContext as i } from "../context.mjs";
function a() {
  const {
    itemRef: c
  } = f.useContext(i), e = f.useRef({});
  function u(o, t) {
    const r = t && typeof t == "object" && t.ref, n = o.join("_");
    return (e.current.name !== n || e.current.originRef !== r) && (e.current.name = n, e.current.originRef = r, e.current.ref = m(c(o), r)), e.current.ref;
  }
  return u;
}
export {
  a as default
};
