export type DashboardPeriod = "7d" | "30d" | "90d" | "12m";

export interface CompanyGrowthPoint {
  date: string;
  new: number;
  verified: number;
}

export interface VehicleGrowthPoint {
  date: string;
  new: number;
  connected: number;
}

export interface SubscriptionTimelinePoint {
  date: string;
  active: number;
  trial: number;
  expired: number;
}

export interface DistributionPoint {
  label: string;
  value: number;
}

export interface DashboardCharts {
  company_growth: CompanyGrowthPoint[];
  vehicle_growth: VehicleGrowthPoint[];
  subscription_timeline: SubscriptionTimelinePoint[];
  plan_distribution: DistributionPoint[];
  motor_type_distribution: DistributionPoint[];
}

export interface DashboardStats {
  companies: {
    total: number;
    with_vehicles: number;
    new_last_30_days: number;
  };
  vehicles: {
    total: number;
    connected: number;
  };
  users: {
    total: number;
  };
  subscriptions: {
    active: number;
    trial: number;
  };
  sites: {
    total: number;
  };
  plan_distribution: Array<{
    plan: string;
    count: number;
  }>;
  charts: DashboardCharts;
}
