import './platform_content_type.dart';
import './platform_player_statistic_record.dart';
import './platform_player_subtitle_record.dart';

abstract class PlatformPlayerContent {
  PlatformContentType get content;
  List<PlatformPlayerStatisticRecord> get statistics;
  List<PlatformPlayerSubtitleRecord> get subtitles;

  String toJson() {
    final jsonStatistics = statistics.map((e) => e.toJson());
    final jsonSubtitle = subtitles.map((e) => e.toJson());
    return '{"content": ${content.toJson()}, "statistics": [${jsonStatistics.join(',')}], "subtitles": [${jsonSubtitle.join(',')}]}';
  }
}