UNPKG

@nextcloud/vue

Version:
24 lines (23 loc) 651 B
import { toValue } from "@vueuse/core"; import { watch, onUnmounted } from "vue"; import { c as createTrapStackController } from "./focusTrap-HJQ4pqHV.mjs"; function useTrapStackControl(shouldPause, options = {}) { const trapStackController = createTrapStackController(); watch(shouldPause, () => { if (toValue(options.disabled)) { return; } if (toValue(shouldPause)) { trapStackController.pause(); } else { trapStackController.unpause(); } }); onUnmounted(() => { trapStackController.unpause(); }); } export { useTrapStackControl as u }; //# sourceMappingURL=useTrapStackControl-BnLfCgGU.mjs.map