'use strict';

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

var vue = require('vue');
require('../../../../utils/index.cjs');
var canUseDom = require('../../../../utils/dom/canUseDom.cjs');

let uuid = 0;
const isBrowserClient = process.env.NODE_ENV !== "test" && canUseDom.canUseDom();
function getUUID() {
  let retId;
  if (isBrowserClient) {
    retId = uuid;
    uuid += 1;
  } else {
    retId = "TEST_OR_SSR";
  }
  return retId;
}
function useId(id = vue.ref("")) {
  const innerId = `rc_select_${getUUID()}`;
  return id.value || innerId;
}

exports.default = useId;
exports.getUUID = getUUID;
exports.isBrowserClient = isBrowserClient;
//# sourceMappingURL=useId.cjs.map
