DigitalConsumer.ISS/src/helpers/loading-modal-helper.js
Bill Richardson a9f02cdddc LoadingModal updates for coverage statement
Add ability to have textSlides to Global Loading Modal
2024-04-22 16:10:18 -04:00

24 lines
734 B
JavaScript

import { reactive } from 'vue';
// state encapsulated and managed by the composable
const globalNonpersistedState = reactive({
showLoadingModal: true,
showTextCarousel: false,
carouselTextSlides: []
});
const showIssLoadingModal = (newValue, showTextCarousel = false, carouselTextSlides = []) => {
if (newValue !== undefined) {
globalNonpersistedState.showLoadingModal = newValue;
}
if (showTextCarousel !== undefined) {
globalNonpersistedState.showTextCarousel = showTextCarousel;
}
if (carouselTextSlides !== undefined) {
globalNonpersistedState.carouselTextSlides = carouselTextSlides;
}
return { globalNonpersistedState };
};
export default showIssLoadingModal;