Line data Source code
1 : import { computed, ref } from 'vue'
2 :
3 68 : export function useZoomControls() {
4 68 : const isModalVisible = ref(false)
5 :
6 68 : const showModal = () => {
7 0 : isModalVisible.value = true
8 : }
9 :
10 68 : const hideModal = () => {
11 1 : isModalVisible.value = false
12 : }
13 :
14 68 : const toggleModal = () => {
15 7 : isModalVisible.value = !isModalVisible.value
16 : }
17 :
18 : const hasActivePopup = computed(() => isModalVisible.value)
19 :
20 68 : return {
21 : isModalVisible,
22 : showModal,
23 : hideModal,
24 : toggleModal,
25 : hasActivePopup
26 : }
27 : }
|