'use strict';

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

var vue = require('vue');
var core = require('@vueuse/core');
var index = require('../use-global-config/index.js');

const zIndex = vue.ref(0);
let PopupManager = void 0;
const useZIndex = () => {
  if (core.isClient) {
    PopupManager = window.PopupManager;
  }
  const initialZIndex = index.useGlobalConfig("zIndex", PopupManager ? PopupManager.zIndex : 2e3);
  const currentZIndex = vue.computed(() => initialZIndex.value + zIndex.value);
  const nextZIndex = () => {
    zIndex.value++;
    if (PopupManager) {
      return PopupManager.nextZIndex();
    }
    return currentZIndex.value;
  };
  return {
    initialZIndex,
    currentZIndex,
    nextZIndex
  };
};

exports.useZIndex = useZIndex;
//# sourceMappingURL=index.js.map
