export interface DashboardTrendDay {
  date: string;
  label: string;
  betCount: number;
  stake: string;
  payout: string;
  ggr: string;
}

export interface AdminDashboard {
  generatedAt: string;
  trend7d: DashboardTrendDay[];
  today: {
    betCount: number;
    stake: string;
    payout: string;
    ggr: string;
    newPlayers: number;
  };
  yesterday: {
    betCount: number;
    stake: string;
    payout: string;
    ggr: string;
  };
  users: {
    playersTotal: number;
    playersActive: number;
    playersSuspended: number;
    playersDirect: number;
    playersOnlineNow: number;
    agentsTotal: number;
    agentsActive: number;
  };
  wallets: {
    totalAvailable: string;
    totalFrozen: string;
    playerWalletCount: number;
  };
  agents: {
    totalCreditLimit: string;
    totalUsedCredit: string;
    totalAvailableCredit: string;
  };
  matches: {
    total: number;
    draft: number;
    published: number;
    closed: number;
    cancelled: number;
    pendingSettlement: number;
    settled: number;
  };
  bets: {
    pendingTotal: number;
    todayByStatus: Record<string, { count: number; stake: string }>;
  };
  recentBets: {
    betNo: string;
    username: string;
    stake: string;
    status: string;
    placedAt: string;
  }[];
  recentPlayers: {
    id: string;
    username: string;
    status: string;
    parentUsername: string | null;
    createdAt: string;
  }[];
}

export interface AgentDashboard {
  generatedAt: string;
  trend7d: DashboardTrendDay[];
  today: {
    betCount: number;
    stake: string;
    payout: string;
    ggr: string;
    newPlayers: number;
  };
  yesterday: {
    betCount: number;
    stake: string;
    payout: string;
    ggr: string;
  };
  players: {
    directTotal: number;
    active: number;
    suspended: number;
    newToday: number;
  };
  subAgents: {
    total: number;
    active: number;
  };
  wallets: {
    totalAvailable: string;
    totalFrozen: string;
    playerWalletCount: number;
  };
  credit: {
    creditLimit: string;
    usedCredit: string;
    availableCredit: string;
    directPlayerLiability: string;
    childAgentExposure: string;
  };
  bets: {
    pendingTotal: number;
    todayByStatus: Record<string, { count: number; stake: string }>;
  };
  recentBets: {
    betNo: string;
    username: string;
    stake: string;
    status: string;
    placedAt: string;
  }[];
  recentPlayers: {
    id: string;
    username: string;
    status: string;
    createdAt: string;
  }[];
}
