UNPKG

bootstrap-vue-next

Version:

BootstrapVueNext is an early and lovely component library for Vue 3 & Nuxt 3 based on Bootstrap 5 and Typescript.

30 lines (29 loc) 952 B
import { inject } from "vue"; import { u as useSharedModalStack } from "../../../useModalManager-qY_WWJHm.mjs"; import { m as modalControllerPluginKey } from "../../../keys-BZewGSMQ.mjs"; const useModalController = () => { const { lastStack, stack } = useSharedModalStack(); const modalControllerPlugin = inject(modalControllerPluginKey); const hide = (trigger = "") => { var _a; if (lastStack == null ? void 0 : lastStack.value) { (_a = lastStack == null ? void 0 : lastStack.value.exposed) == null ? void 0 : _a.hide(trigger); } }; const hideAll = (trigger = "") => { stack == null ? void 0 : stack.value.forEach((modal) => { var _a; (_a = modal.exposed) == null ? void 0 : _a.hide(trigger); }); }; return { ...modalControllerPlugin, hide, hideAll // Todo: Supports listening events globally in the future }; }; export { useModalController }; //# sourceMappingURL=index.mjs.map