"use strict";
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
const React = require("react");
const useThrottledCallback = require("../use-throttled-callback/use-throttled-callback.cjs");
function useThrottledState(defaultValue, wait) {
  const [value, setValue] = React.useState(defaultValue);
  const [setThrottledValue, clearTimeout] = useThrottledCallback.useThrottledCallbackWithClearTimeout(setValue, wait);
  React.useEffect(() => clearTimeout, []);
  return [value, setThrottledValue];
}
exports.useThrottledState = useThrottledState;
