import s from "../../../rc-util/es/Dom/canUseDom.mjs";
import * as o from "react";
var c = {
  subtree: !0,
  childList: !0,
  attributeFilter: ["style", "class"]
};
function v(e, i) {
  var a = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : c;
  o.useEffect(function() {
    if (!(!s() || !e)) {
      var n, u = Array.isArray(e) ? e : [e];
      return "MutationObserver" in window && (n = new MutationObserver(i), u.forEach(function(t) {
        n.observe(t, a);
      })), function() {
        var t, r;
        (t = n) === null || t === void 0 || t.takeRecords(), (r = n) === null || r === void 0 || r.disconnect();
      };
    }
  }, [a, e]);
}
export {
  v as default
};
