"use client";
const require_use_force_update = require("../use-force-update/use-force-update.cjs");
let react = require("react");
//#region packages/@mantine/hooks/src/use-map/use-map.ts
function useMap(initialState) {
	const mapRef = (0, react.useRef)(new Map(initialState));
	const forceUpdate = require_use_force_update.useForceUpdate();
	mapRef.current.set = (...args) => {
		Map.prototype.set.apply(mapRef.current, args);
		forceUpdate();
		return mapRef.current;
	};
	mapRef.current.clear = (...args) => {
		Map.prototype.clear.apply(mapRef.current, args);
		forceUpdate();
	};
	mapRef.current.delete = (...args) => {
		const res = Map.prototype.delete.apply(mapRef.current, args);
		forceUpdate();
		return res;
	};
	return mapRef.current;
}
//#endregion
exports.useMap = useMap;

//# sourceMappingURL=use-map.cjs.map