package router

func registerAnalyticsRoutes(cfg *Config) {
	e := cfg.Echo

	// JWT middleware for protected routes
	jwtMiddleware := createJWTMiddleware(cfg)

	protected := e.Group("/api", jwtMiddleware)

	// Analytics routes
	analytics := protected.Group("/analytics")
	analytics.GET("/reading-stats", cfg.AnalyticsHandler.GetReadingStats)
	analytics.GET("/device-usage", cfg.AnalyticsHandler.GetDeviceUsage)
	analytics.GET("/popular-books", cfg.AnalyticsHandler.GetPopularBooks)
}
