import { ref, getCurrentInstance, inject, computed, unref } from "vue";
import { isNumber as i } from "../../utils/types.mjs";
const r = ref(0), a = 2e3, l = Symbol("zIndexContextKey"), f = (x) => {
  const c = getCurrentInstance() ? inject(l, void 0) : void 0, e = computed(() => {
    const t = unref(c);
    return i(t) ? t : a;
  }), n = computed(() => e.value + r.value);
  return {
    initialZIndex: e,
    currentZIndex: n,
    nextZIndex: () => (r.value++, n.value)
  };
};
export {
  a as defaultInitialZIndex,
  f as useZIndex,
  l as zIndexContextKey
};
