import { useAuthStore } from '@/stores/authStore'
import { storeToRefs } from 'pinia'

export function useAuth() {
  const store = useAuthStore()
  const refs = storeToRefs(store)
  return {
    ...refs,    // includes: user, loading, error, isAuthenticated (as refs)
    ...store    // includes: login(), logout(), etc.
  }
}
