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

export type Result = {
  code: number;
  message: string;
  data: any;
};

export const getOverview = () => {
  return http.request<Result>("get", "/dashboard/overview");
};

export const getStatistics = (type: string = "week") => {
  return http.request<Result>("get", `/dashboard/statistics?type=${type}`);
};

export const getQuickLinks = () => {
  return http.request<Result>("get", "/dashboard/quick-links");
};

export const getDeviceStatus = () => {
  return http.request<Result>("get", "/dashboard/device-status");
};
