import * as u from "react";
import { u as a } from "./index-CCKe-Mpx.mjs";
var o = u[" useId ".trim().toString()] || (() => {
}), n = 0;
function f(e) {
  const [t, r] = u.useState(o());
  return a(() => {
    r((s) => s ?? String(n++));
  }, [e]), e || (t ? `radix-${t}` : "");
}
function i(e) {
  const t = u.useRef(e);
  return u.useEffect(() => {
    t.current = e;
  }), u.useMemo(() => (...r) => t.current?.(...r), []);
}
export {
  i as a,
  f as u
};
//# sourceMappingURL=index-BRi38DTc.mjs.map
