'use strict';

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(""), prefix = "vc_unique") {
  const innerId = `${prefix}_${getUUID()}`;
  return id.value || innerId;
}

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