"use strict";Object.defineProperty(exports, "__esModule", {value: true});// src/hooks/useDebounce.tsx
var _lodashes = require('lodash-es');
var _react = require('react');
function useDebounce(value, delay = 0, options) {
  const [current, setCurrent] = _react.useState.call(void 0, value);
  const jsonOptions = JSON.stringify(options);
  _react.useEffect.call(void 0, () => {
    const debounced = _lodashes.debounce.call(void 0, 
      () => {
        setCurrent(value);
      },
      delay,
      options
    );
    debounced();
    return () => {
      debounced.cancel();
    };
  }, [value, delay, jsonOptions]);
  return current;
}



exports.useDebounce = useDebounce;
