import type { DownloadStats } from '~/types'
import { mockDownloadStats } from '~/data/versions'

// 获取下载统计（可替换为真实 API）
export async function fetchDownloadStats(): Promise<DownloadStats> {
  // 模拟 API 延迟
  await new Promise(resolve => setTimeout(resolve, 500))
  return mockDownloadStats
}

// 记录下载事件（可替换为真实 API）
export async function trackDownload(platform: 'ios' | 'android' | 'h5'): Promise<void> {
  // 模拟 API 延迟
  await new Promise(resolve => setTimeout(resolve, 200))
  console.log(`Download tracked: ${platform}`)
}
