import { http } from "@/utils/http";

/** 获取仪表盘数据 */
export const getDashboard = (stationId?: string) => {
  return http.request<any>("get", "/stat/dashboard", {
    params: { stationId }
  });
};

/** 获取趋势数据 */
export const getTrend = (data: {
  startTime: string;
  endTime: string;
  type: string;
  pageSize: number;
  stationId?: string;
}) => {
  return http.request<any>("post", "/stat/trend", { data });
};

/** 获取洗车设备状态 */
export const getWashDeviceStatus = (stationId?: string) => {
  return http.request<any>("get", "/stat/washDeviceStatus", {
    params: { stationId }
  });
};
