"use strict";
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
const keys = require("../../../keys-D70E9HED.js");
const src_composables_useRegistry_index = require("../../composables/useRegistry/index.umd.js");
const vue = require("vue");
const registryPlugin = {
  install(app) {
    const { register, values } = src_composables_useRegistry_index._newShowHideRegistry();
    app.provide(keys.showHideRegistryKey, { register, values });
    const items = vue.ref({
      [keys.breadcrumbGlobalIndexKey]: []
    });
    const reset = (key = keys.breadcrumbGlobalIndexKey) => {
      items.value[key] = [];
    };
    app.provide(keys.breadcrumbRegistryKey, { items, reset });
    const stack = vue.ref(/* @__PURE__ */ new Map());
    const countStack = vue.computed(() => stack.value.size);
    const valuesStack = vue.computed(() => [...stack.value.values()]);
    const lastStack = vue.computed(() => valuesStack.value[valuesStack.value.length - 1]);
    const pushStack = (modal) => {
      stack.value.set(modal.uid, modal);
    };
    const removeStack = (modal) => {
      stack.value.delete(modal.uid);
    };
    const registry = vue.ref(/* @__PURE__ */ new Map());
    const pushRegistry = (modal) => {
      registry.value.set(modal.uid, modal);
    };
    const removeRegistry = (modal) => {
      registry.value.delete(modal.uid);
    };
    app.provide(keys.modalManagerKey, {
      countStack,
      lastStack,
      registry: vue.computed(() => registry.value),
      stack: valuesStack,
      pushStack,
      removeStack,
      pushRegistry,
      removeRegistry
    });
  }
};
exports.registryPlugin = registryPlugin;
//# sourceMappingURL=index.umd.js.map
