import { freeze as n, produce as u } from "../../immer/dist/immer.mjs";
import { useState as i, useCallback as f } from "react";
function p(e) {
  var r = i(function() {
    return n(typeof e == "function" ? e() : e, !0);
  }), t = r[1];
  return [r[0], f(function(o) {
    t(typeof o == "function" ? u(o) : n(o));
  }, [])];
}
export {
  p as useImmer
};
