'use strict';

Object.defineProperty(exports, '__esModule', { value: true });

var React = require('react');
var jsxRuntime = require('react/jsx-runtime');

function withId(WrappedComponent) {
  function WithIdComponent(props) {
    const id = React.useId();
    return /*#__PURE__*/jsxRuntime.jsx(WrappedComponent, {
      ...props,
      id: props.id || id
    });
  }
  WithIdComponent.displayName = `withId(${WrappedComponent.displayName || WrappedComponent.name || 'Component'})`;
  return WithIdComponent;
}

exports.default = withId;
//# sourceMappingURL=withId.js.map
