import { ref } from 'vue';
import { defineStore } from 'pinia';

export const useUserInfoStore = defineStore('userInfo', () => {
  const token = ref<string>();

  const saveToken = (val: string) => {
    token.value = val;
  };

  const resetToken = () => {
    token.value = undefined;
  };

  return {
    token,
    saveToken,
    resetToken,
  };
});
