"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
exports.__esModule = true;
exports.useId = void 0;
var _react = require("react");
var _uniqueId = _interopRequireDefault(require("lodash/uniqueId"));
var useId = prefix => {
  // FIXME: doesn't work in SSR, replace with `useId` from react 18 someday
  var idRef = (0, _react.useRef)();
  if (idRef.current === undefined) {
    idRef.current = (0, _uniqueId.default)(prefix);
  }
  return idRef.current;
};
exports.useId = useId;
//# sourceMappingURL=useId.js.map