import { u } from "./useRenderElement.js";
import { t as c } from "./useOnMount.js";
var t = 0, n = class e {
  static create() {
    return new e();
  }
  currentId = t;
  start(s, i) {
    this.clear(), this.currentId = setTimeout(() => {
      this.currentId = t, i();
    }, s);
  }
  isStarted() {
    return this.currentId !== t;
  }
  clear = () => {
    this.currentId !== t && (clearTimeout(this.currentId), this.currentId = t);
  };
  disposeEffect = () => this.clear;
};
function d() {
  const r = u(n.create).current;
  return c(r.disposeEffect), r;
}
export {
  d as n,
  n as t
};

//# sourceMappingURL=useTimeout.js.map