import { useMemo } from "react";
var id = 0;

var genId = function genId() {
  return ++id;
};

var useId = function useId(prodId) {
  var prefix = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "cle";
  return useMemo(function () {
    return prodId ? prodId : "".concat(prefix, "-").concat(genId());
  }, [prodId, prefix]);
};

export default useId;