import type { PaginationDto } from "@/types/api-response";

// ========================
// Shared Query Params
// ========================

export interface AdminPaginationParams extends PaginationDto {
  sortBy?: string;
  sortOrder?: "asc" | "desc";
  search?: string;
}

// ========================
// Settings
// ========================

export interface SettingDto {
  key: string;
  value: string;
}

export interface UpdateSettingDto {
  value: string;
}

// ========================
// Usage Limits
// ========================

export interface UsageLimitDto {
  id: string;
  userId: string;
  feature: string;
  used: number;
  limit: number;
  resetAt?: string;
  [key: string]: unknown;
}

// ========================
// Admin Users
// ========================

export interface AdminUserDto {
  id: string;
  email: string;
  firstName?: string;
  lastName?: string;
  role?: string;
  isActive: boolean;
  subscription?: string;
  createdAt: string;
  [key: string]: unknown;
}

export interface UpdateUserRoleDto {
  role: string;
}

export interface UpdateUserSubscriptionDto {
  subscription: string;
}

// ========================
// Analytics
// ========================

export interface AnalyticsOverviewDto {
  totalUsers?: number;
  activeUsers?: number;
  totalPredictions?: number;
  totalCoupons?: number;
  users?: {
    total: number;
    active: number;
    premium: number;
  };
  matches?: number;
  predictions?: number;
  aiHealth?: Record<string, unknown>;
  [key: string]: unknown;
}
