import { e as $8ae05eaa5c114e9c$export$7f54fc3180508a52 } from "./utils-cvK1vxO7.js";
import { useEffect } from "react";
function $99facab73266f662$export$5add1d006293d136(ref, initialValue, onReset) {
  let handleReset = $8ae05eaa5c114e9c$export$7f54fc3180508a52(() => {
    if (onReset) onReset(initialValue);
  });
  useEffect(() => {
    var _ref_current;
    let form = ref === null || ref === void 0 ? void 0 : (_ref_current = ref.current) === null || _ref_current === void 0 ? void 0 : _ref_current.form;
    form === null || form === void 0 ? void 0 : form.addEventListener("reset", handleReset);
    return () => {
      form === null || form === void 0 ? void 0 : form.removeEventListener("reset", handleReset);
    };
  }, [
    ref,
    handleReset
  ]);
}
export {
  $99facab73266f662$export$5add1d006293d136 as $
};
