import type { GetUserPointApi } from '@/api/global'
import globalApi from '@/api/global'
import { defineStore } from 'pinia'

export const useHomeRedPointStore = defineStore('home-red-point', () => {
  const redPointStatus = ref({} as GetUserPointApi)
  const setRedPointStatus = async () => {
    redPointStatus.value = await globalApi.getUserPointApi()
  }
  const $reset = () => {
    redPointStatus.value = {} as any
  }
  return { redPointStatus, setRedPointStatus, $reset }
})
