UNPKG

bootstrap-vue-next

Version:

Seamless integration of Vue 3, Bootstrap 5, and TypeScript for modern, type-safe UI development

39 lines (38 loc) 1.21 kB
//#region src/utils/registryAccess.ts /** * Gets the active show/hide instance for a given ID. * Uses getActive() which returns the most recent instance to handle UID disambiguation. * * @param registry - The show/hide registry ref (or null) * @param id - The component ID to look up (or falsy value) * @returns The active show/hide instance, undefined if not found, or null if id is falsy */ var getActiveShowHide = (registry, id) => { if (!id) return null; if (!registry) return void 0; return registry.value.get(id)?.getActive(); }; /** * Gets the boolean visibility state of a show/hide component. * * @param registry - The show/hide registry ref (or null) * @param id - The component ID to look up * @returns The visibility state (true if shown), or false if not found */ var getShowHideValue = (registry, id) => { return getActiveShowHide(registry, id)?.value.value ?? false; }; //#endregion Object.defineProperty(exports, "getActiveShowHide", { enumerable: true, get: function() { return getActiveShowHide; } }); Object.defineProperty(exports, "getShowHideValue", { enumerable: true, get: function() { return getShowHideValue; } }); //# sourceMappingURL=registryAccess-ROXkP1Do.js.map