import { ref } from 'vue'
import { createGlobalState } from '@vueuse/core'

export const useGlobalState = createGlobalState(
  () => {
    const token = ref(null)
    return { token }
  }
)

export const asideShow = createGlobalState(
  () => {
    const isHide = ref(false)

    function toggleAside() {
      isHide.value = !isHide.value
    }

    return { isHide, toggleAside }
  }
)