import { get } from '../request'
import type { LogFile, LogContent, TrainingLogFile } from '@/types'

/** 按日期获取系统日志文件列表 */
export const getLogFiles = (date: string) =>
  get<LogFile[]>('/log-files', { date })

/** 获取系统日志内容 */
export const getLogContent = (file: string) =>
  get<LogContent>('/log-content', { file })

/** 训练日志文件列表 */
export const getTrainingLogFiles = () =>
  get<TrainingLogFile[]>('/training-log-files')

/** 训练日志内容 */
export const getTrainingLogContent = (file: string) =>
  get<LogContent>('/training-log-content', { file })
