import a from "../../@babel/runtime/helpers/esm/slicedToArray.mjs";
import * as s from "react";
import o from "../../rc-util/es/hooks/useLayoutEffect.mjs";
function m(r, n) {
  var f = s.useState(!1), t = a(f, 2), e = t[0], u = t[1];
  o(function() {
    if (e)
      return r(), function() {
        n();
      };
  }, [e]), o(function() {
    return u(!0), function() {
      u(!1);
    };
  }, []);
}
export {
  m as default
};
