import 'package:fis_common/event/event_type.dart';
import 'package:fis_jsonrpc/rpc.dart';
import 'package:flyinsono/managers/interfaces/entities/classInfo.dart';
import 'package:flyinsono/pages/college/index.dart';

import 'entities/media_library.dart';

abstract class IFlyinsonoCollegeManager {
  final onUpdateLibrary = FEventHandler<bool>();
  final onRecordFilePathUpdate = FEventHandler<String>();

  String statusTranslation(LiveCourseStatus status);

  ///获取所有素材
  Future<List<MediaLibrary>> getMediaLibrarys({
    String? keyword,
    int pageIndex = 1,
    int pageCount = 100,
  });

  ///创建素材
  Future<bool> createVideosAsync({
    required List<SaveVideoRequest> videoList,
  });

  ///获取学生列表
  Future<PageResult<UserExtendDTO>> getStudents({
    String? keyword,
    int pageIndex = 1,
  });

  ///获取讲师列表
  Future<List<UserExtendDTO>> getTeachers({
    String? keyword,
  });

  ///获取班级信息
  Future<UserGroupList> getClassInfos({
    ClassRoleType? roleType,
    String? keyword,
    int pageIndex = 1,
    int pageCount = 100,
  });

  ///获取申请的学生
  Future<List<UserGroupStudentsDTO>> getApplyStudent({
    required String classCode,
  });

  ///获取班级内的学生
  Future<List<UserGroupStudentsDTO>> getClassStudents({
    required String classCode,
    required LearnerStatusEnum learnerStatus,
  });

  ///修改素材名称
  Future<bool> changeVideoName(String name, String code);

  /// 设置录屏文件路径
  Future<bool> setRecordFilePath(String path);
}
