/**
 * Analytics Module Index
 * Exports all analytics functionality
 */

// Types
export * from './types';

// Data aggregation
export {
  getDateRangeFromTimeRange,
  generateTimeSeriesPoints,
  aggregateByPeriod,
  calculateChange,
  getAnalyticsOverview,
  getPlantAnalytics,
  getTransportAnalytics,
  getFarmAnalytics,
  getSustainabilityAnalytics,
  getCachedData,
  setCachedData,
  clearCache,
  generateCacheKey,
} from './aggregator';

// Metrics calculations
export {
  mean,
  median,
  standardDeviation,
  percentile,
  minMax,
  getTrendDirection,
  percentageChange,
  movingAverage,
  rateOfChange,
  normalize,
  cagr,
  efficiencyScore,
  carbonIntensity,
  foodMilesScore,
  sustainabilityScore,
  generateKPICards,
  calculateGrowthMetrics,
  detectAnomalies,
  correlationCoefficient,
  formatNumber,
  formatPercentage,
} from './metrics';

// Trend analysis
export {
  analyzeTrend,
  linearRegression,
  forecast,
  detectSeasonality,
  findPeaksAndValleys,
  calculateMomentum,
  exponentialSmoothing,
  generateTrendSummary,
  compareTimeSeries,
  getTrendConfidence,
  yearOverYearComparison,
} from './trends';

// Cache management
export {
  analyticsCache,
  withCache,
} from './cache';
