import { StoreEnum } from '@/enum/store'
import { useLocalStorage } from '@/hook'
import { defineStore } from 'pinia'

export const useTokenStore = defineStore(StoreEnum.TOKEN, () => {

  const [ state, setState ] = useLocalStorage(StoreEnum.TOKEN)

  return {
    get: () => state,
    set: (token: string) => setState(token)
  }

})


