import o, { forwardRef as v, useMemo as c } from "react";
import { composeRef as i, supportRef as u } from "../../rc-util/es/ref.mjs";
var p = /* @__PURE__ */ v(function(a, l) {
  var r = a.overlay, f = a.arrow, n = a.prefixCls, e = c(function() {
    var t;
    return typeof r == "function" ? t = r() : t = r, t;
  }, [r]), m = i(l, e == null ? void 0 : e.ref);
  return /* @__PURE__ */ o.createElement(o.Fragment, null, f && /* @__PURE__ */ o.createElement("div", {
    className: "".concat(n, "-arrow")
  }), /* @__PURE__ */ o.cloneElement(e, {
    ref: u(e) ? m : void 0
  }));
});
export {
  p as default
};
