import { apiGet } from "@/api/client";

export interface DashboardCard {
  label: string;
  value: string;
  tone?: string | null;
}

export interface StageStatus {
  label: string;
  value: string;
}

export interface AdminOverviewResponse {
  cards: DashboardCard[];
  stage_statuses: StageStatus[];
}

export interface AdminQueueItem {
  order_id: string;
  product_name: string;
  customer_name: string;
  status: string;
  sla: string;
}

export function fetchAdminOverview(accessToken: string) {
  return apiGet<AdminOverviewResponse>("/orders/admin/overview", { accessToken });
}

export function fetchAdminQueue(accessToken: string) {
  return apiGet<AdminQueueItem[]>("/orders/admin/queue", { accessToken });
}
