import { E as compilerRuntimeExports, r as reactExports } from "./vendor-react-DYNCg6N5.js";
const useDebounce = (value, t0) => {
  const $ = compilerRuntimeExports.c(4);
  const delay = t0 === void 0 ? 300 : t0;
  const [debounced, setDebounced] = reactExports.useState(value);
  let t1;
  let t2;
  if ($[0] !== delay || $[1] !== value) {
    t1 = () => {
      const handler = setTimeout(() => setDebounced(value), delay);
      return () => clearTimeout(handler);
    };
    t2 = [value, delay];
    $[0] = delay;
    $[1] = value;
    $[2] = t1;
    $[3] = t2;
  } else {
    t1 = $[2];
    t2 = $[3];
  }
  reactExports.useEffect(t1, t2);
  return debounced;
};
export {
  useDebounce as u
};
//# sourceMappingURL=useDebounce-DTubzIUC.js.map
