import * as a from "react";
import { useLayoutEffect as f } from "../../react-use-layout-effect/dist/index.js";
const r = a.useId || (() => {
});
let n = 0;
function u(o) {
  const [e, $] = a.useState(r());
  return f(() => {
    $(
      (t) => t ?? String(n++)
    );
  }, [
    o
  ]), e ? `radix-${e}` : "";
}
export {
  u as useId
};
