export enum ComparisonMetric {
  SLEEP_PATTERNS = 'sleep-patterns',
  FEEDING_FREQUENCY = 'feeding-frequency',
  GROWTH_CURVES = 'growth-curves',
  DIAPER_CHANGES = 'diaper-changes',
  ACTIVITIES = 'activities',
}

export interface ComparisonChildData {
  childId: string;
  childName: string;
  age: number; // in months
  data: any;
  summary: any;
}

export interface ComparisonResult {
  metric: ComparisonMetric;
  dateRange: {
    start: Date;
    end: Date;
  };
  children: ComparisonChildData[];
  overallSummary?: any;
}

export interface SleepComparisonData {
  averageHoursPerDay: number;
  totalSleepSessions: number;
  longestSleepDuration: number; // in minutes
  averageNapsPerDay: number;
  nightSleepPercentage: number; // percentage of sleep during night (8PM-6AM)
  dailyBreakdown: Array<{
    date: string;
    totalMinutes: number;
    sessionsCount: number;
  }>;
}

export interface FeedingComparisonData {
  totalFeedings: number;
  averageFeedingsPerDay: number;
  feedingMethods: Record<string, number>; // { bottle: 10, breast: 5 }
  averageAmountPerFeeding?: number; // if tracked
  dailyBreakdown: Array<{
    date: string;
    count: number;
    totalAmount?: number;
  }>;
}

export interface DiapeChangesComparisonData {
  totalChanges: number;
  averageChangesPerDay: number;
  wetDiapers: number;
  dirtyDiapers: number;
  bothDiapers: number;
  dailyBreakdown: Array<{
    date: string;
    wet: number;
    dirty: number;
    both: number;
  }>;
}

export interface ActivitiesComparisonData {
  totalActivities: number;
  averageActivitiesPerDay: number;
  activitiesByType: Record<string, number>;
  mostCommonActivity: string;
  dailyBreakdown: Array<{
    date: string;
    count: number;
    types: Record<string, number>;
  }>;
}
