import { createContext, useId } from 'react';
import { jsx } from 'react/jsx-runtime';

const OverlayIdContext = /*#__PURE__*/createContext(undefined);
const OverlayIdProvider = ({
  open,
  children
}) => {
  const id = useId();
  return /*#__PURE__*/jsx(OverlayIdContext.Provider, {
    value: open ? id : undefined,
    children: children
  });
};

export { OverlayIdContext, OverlayIdProvider };
//# sourceMappingURL=OverlayIdProvider.mjs.map
