import { ref } from 'vue';
import '../../../../utils/index.mjs';
import { canUseDom } from '../../../../utils/dom/canUseDom.mjs';

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

export { useId as default, getUUID, isBrowserClient };
//# sourceMappingURL=useId.mjs.map
