import * as React from 'react';
import { u as useLayoutEffect2 } from './index-DOzu5J1s.js';

// packages/react/id/src/id.tsx
var useReactId = React[" useId ".trim().toString()] || (() => void 0);
var count = 0;
function useId(deterministicId) {
  const [id, setId] = React.useState(useReactId());
  useLayoutEffect2(() => {
    setId((reactId) => reactId ?? String(count++));
  }, [deterministicId]);
  return (id ? `radix-${id}` : "");
}

export { useId as u };
//# sourceMappingURL=index-zW4GjM5L.js.map
