Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
require("../chunk-BN4qSVkS.cjs");
let lodash_es = require("lodash-es");
let react = require("react");
//#region src/hooks/useDebounce.tsx
function useDebounce(value, delay = 0, options) {
	const [current, setCurrent] = (0, react.useState)(value);
	(0, react.useEffect)(() => {
		const debounced = (0, lodash_es.debounce)(() => {
			setCurrent(value);
		}, delay, options);
		debounced();
		return () => {
			debounced.cancel();
		};
	}, [
		value,
		delay,
		JSON.stringify(options)
	]);
	return current;
}
//#endregion
exports.useDebounce = useDebounce;
