import { defineStore } from 'pinia'
import { ref,reactive } from 'vue'

export const useAuthStore = defineStore('authStore', () => {
  const loginData = reactive<Record<string, any>>({ username: '', password: '' })
  const safeLoginData = reactive<Record<string, any>>({})
  const rolesList = ref<Record<string, any>[]>([])

  Object.assign(safeLoginData, loginData)

  return { loginData, safeLoginData, rolesList }
})
