import store from "@/store";
import {ref} from "vue"

export const getWindowSize = computed(() => {
    return store.state.app.windowSize
})

export const visibleWindowSize = ref({
    height: 0,
    width: 0
})

let visibleWindowSizeList = []
export const setVisibleSize = (val) => {
    visibleWindowSize.value = val
    visibleWindowSizeList.forEach(item => {
        item(visibleWindowSize.value)
    })
}

export const getVisibleSize = (cb) => {
    visibleWindowSizeList.push(cb)
}
