import 'video_item.dart'; enum RadarSessionMode { normal, discovery, learn, relax, short, long, } extension RadarSessionModeLabel on RadarSessionMode { String get label { switch (this) { case RadarSessionMode.normal: return 'Comme d’habitude'; case RadarSessionMode.discovery: return 'Je veux du nouveau'; case RadarSessionMode.learn: return 'Apprendre'; case RadarSessionMode.relax: return 'Détente'; case RadarSessionMode.short: return 'Courtes vidéos'; case RadarSessionMode.long: return 'Long format'; } } String get shortLabel { switch (this) { case RadarSessionMode.normal: return 'Normal'; case RadarSessionMode.discovery: return 'Découverte'; case RadarSessionMode.learn: return 'Apprendre'; case RadarSessionMode.relax: return 'Détente'; case RadarSessionMode.short: return 'Court'; case RadarSessionMode.long: return 'Long'; } } } enum RadarLane { forYou, continueTopic, discovery, } class RadarRecommendation { const RadarRecommendation({ required this.video, required this.score, required this.reasons, required this.breakdown, required this.lane, required this.matchedTerms, required this.isNewAuthor, }); final VideoItem video; final int score; final List reasons; final Map breakdown; final RadarLane lane; final List matchedTerms; final bool isNewAuthor; } class RadarFeed { const RadarFeed({ required this.mode, required this.generatedAt, required this.profileTopics, required this.primary, required this.continueTopic, required this.discovery, this.categories = const >{}, }); final RadarSessionMode mode; final DateTime generatedAt; final List profileTopics; final List primary; final List continueTopic; final List discovery; /// Primary local classification of proposed videos. /// /// A recommendation belongs to one main category so the category lanes /// stay clean and predictable. final Map> categories; bool get isEmpty => primary.isEmpty && continueTopic.isEmpty && discovery.isEmpty; }