import type { LoginResponse } from '@/types/menu'
import { mockLogin } from '@/mock'

/**
 * 用户登录
 * @param username 用户名
 * @param password 密码
 * @returns LoginResponse 包含 token
 *
 * TODO: 后端就绪后替换为
 * return http.post('/auth/login', { username, password })
 */
export function login(username: string, password: string): Promise<LoginResponse> {
  return mockLogin(username, password)
}
