export interface SalesGrowthFilters {
  group_by?: "month" | "year";
  status?: string;
  from?: string; // ISO 8601
  to?: string; // ISO 8601
}

export interface SalesGrowthEntry {
  year: number;
  month: number;
  month_name: string;
  total_sales: number; // تومان
  total_orders: number;
  avg_per_order: number;
}

export interface SalesGrowthSummary {
  total_sales: number;
  total_orders: number;
  average_per_month: number;
  growth_rate: number;
  peak_month: string;
  peak_month_sales: number;
}

export interface SalesGrowthResponse {
  sales: SalesGrowthEntry[];
  summary: SalesGrowthSummary;
}

export interface UserRegistrationGrowthFilters {
  group_by?: "month" | "year";
  from?: string; // ISO 8601
  to?: string; // ISO 8601
}

export interface UserRegistrationEntry {
  year: number;
  month: number;
  month_name: string;
  total_users: number;
  verified_users: number;
  unverified_users: number;
}

export interface UserRegistrationSummary {
  total_users: number;
  total_verified: number;
  total_unverified: number;
  average_per_month: number;
  growth_rate: number;
  peak_month: string;
  peak_month_count: number;
  verification_rate: number;
}

export interface UserRegistrationGrowthResponse {
  registrations: UserRegistrationEntry[];
  summary: UserRegistrationSummary;
}

export interface SalesByCategoryFilters {
  status?: string;
  from?: string; // ISO 8601
  to?: string; // ISO 8601
}

export interface SalesByCategoryEntry {
  category_id: number;
  category_name: string;
  total_sales: number; // تومان
  total_orders: number;
  total_products: number;
  percentage: number;
  average_per_order: number;
}

export interface SalesByCategorySummary {
  total_sales: number;
  total_orders: number;
  total_categories: number;
  top_category: string;
  top_category_perc: number;
}

export interface SalesByCategoryResponse {
  categories: SalesByCategoryEntry[];
  summary: SalesByCategorySummary;
}
