import 'dart:math'; /// Provides lightweight, offline activity suggestions using heuristics. class ActivitySuggestionService { /// Returns a list of suggestion strings based on [city] and [weatherCode]. /// /// [weatherCode] is a simple tag: `sunny`, `rain`, `cold`, `default`. List suggestions({ required String city, String weatherCode = 'default', }) { final base = [ 'Free walking tour de $city', 'Spot photo au coucher du soleil', 'Café local pour travailler/charger', 'Parc ou rooftop tranquille', ]; if (weatherCode == 'rain') { base.addAll([ 'Musée immanquable de $city', 'Escape game ou activité indoor', 'Food court couvert pour goûter local', ]); } else if (weatherCode == 'cold') { base.addAll(['Spa / bains chauds', 'Visite guidée en intérieur']); } else { base.addAll([ 'Balade vélo ou trottinette', 'Pique-nique au parc central', 'Vue panoramique / rooftop', ]); } // Shuffle slightly for variation. base.shuffle(Random(city.hashCode)); return base.take(6).toList(); } }