import { get, post } from '../request'
import type { SystemInfo, HealthMetrics } from '@/types'

/** 系统信息（CPU/内存/磁盘/GPU/网络/系统） */
export const getSystemInfo = () => get<SystemInfo>('/system-info')

/** 健康指标（顶部栏轻量指标） */
export const getHealth = () => get<HealthMetrics>('/health')

/** 登录 */
export const login = (username: string, password: string) =>
  post('/login', { username, password })
