/**
 * 仪表盘相关API
 */

import { get } from '@/utils/request';

/**
 * 获取仪表盘概览数据
 */
export async function getDashboardOverview(): Promise<any> {
  return get('/dashboard/overview');
}

/**
 * 获取统计数据（按时间维度）
 * @param type 时间类型：yesterday/week/month/days30
 */
export async function getDashboardStatistics(type: string = 'week'): Promise<any> {
  return get('/dashboard/statistics', { type });
}

/**
 * 获取设备状态分布
 */
export async function getDeviceStatusDistribution(): Promise<any> {
  return get('/dashboard/device-status');
}

/**
 * 获取快捷入口数据
 */
export async function getQuickLinks(): Promise<any> {
  return get('/dashboard/quick-links');
}

/**
 * 获取待办事项数据
 */
export async function getTodoList(): Promise<any> {
  return get('/dashboard/quick-links'); // 待办数据从quick-links接口获取
}
