"use client";
import { a as i } from "./useRenderElement-DNB2vtF1.js";
import { u as c } from "./useOnMount-JHtE6teb.js";
const t = 0;
class e {
  static create() {
    return new e();
  }
  currentId = t;
  /**
   * Executes `fn` after `delay`, clearing any previously scheduled call.
   */
  start(s, u) {
    this.clear(), this.currentId = setTimeout(() => {
      this.currentId = t, u();
    }, s);
  }
  isStarted() {
    return this.currentId !== t;
  }
  clear = () => {
    this.currentId !== t && (clearTimeout(this.currentId), this.currentId = t);
  };
  disposeEffect = () => this.clear;
}
function o() {
  const r = i(e.create).current;
  return c(r.disposeEffect), r;
}
export {
  e as T,
  o as u
};
