import 'package:get/get.dart';
import 'package:fis_jsonrpc/rpc.dart';

class PastVideosState {
  // 往期视频列表
  final _videosList = <CourseInfoDetailDTO>[].obs;

  // 一级标签组
  final _topLevelLabelList = <CourseLabelDTO>[].obs;

  // 二级标签组
  final _secondLevelLabelList = <CourseLabelDTO>[].obs;

  // 当前选中的一级标签id
  final _selectedTopLevelLabelId = "".obs;

  // 当前选中的二级标签id
  final _selectedSecondLevelLabelId = "".obs;

  // 是否进入二级标签菜单
  final _isExpandSecondLevelLabel = false.obs;

  // 正在加载数据
  final _isLoading = false.obs;

  set videosList(List<CourseInfoDetailDTO> value) => _videosList.value = value;
  List<CourseInfoDetailDTO> get videosList => _videosList;

  set topLevelLabelList(List<CourseLabelDTO> value) =>
      _topLevelLabelList.value = value;
  List<CourseLabelDTO> get topLevelLabelList => _topLevelLabelList;

  set selectedTopLevelLabelId(String value) =>
      _selectedTopLevelLabelId.value = value;
  String get selectedTopLevelLabelId => _selectedTopLevelLabelId.value;

  set secondLevelLabelList(List<CourseLabelDTO> value) =>
      _secondLevelLabelList.value = value;
  List<CourseLabelDTO> get secondLevelLabelList => _secondLevelLabelList;

  set selectedSecondLevelLabelId(String value) =>
      _selectedSecondLevelLabelId.value = value;
  String get selectedSecondLevelLabelId => _selectedSecondLevelLabelId.value;

  set isExpandSecondLevelLabel(bool value) =>
      _isExpandSecondLevelLabel.value = value;
  bool get isExpandSecondLevelLabel => _isExpandSecondLevelLabel.value;

  set isLoading(bool value) => _isLoading.value = value;
  bool get isLoading => _isLoading.value;
}
