import 'package:fis_lib_media_rt/interface/index.dart';
import 'package:flyinsono/views/common/device_live/device_live_detail/state.dart';
import 'package:flyinsono/views/desktop/remote_maintenance/widgets/apiinfo.dart';
import 'package:get/get.dart';

export 'package:fis_lib_business_components/index.dart';

class RemoteControllerState {
  final Rx<IPlayChannel?> _deviceDesktopChannel = Rx(null);
  final RxString _deviceCode = RxString('');
  final RxString _consultationCode = RxString('');
  final Rx<DeviceStateModel?> _deviceExtendInfoDTO = Rx(null);
  RxList<ApiInfo> _allModes = RxList([]);
  RxMap<String, dynamic> _probeData = RxMap({});
  RxString _currentApply = RxString('');
  RxString _currentSelectedMode = RxString('');
  RxInt _totalPage = RxInt(1);
  RxList<ApplicationInfo> _allApplyDatas = RxList([]);
  Rx<bool> _isSensorDataAvailable = Rx(false);

  /// 参数第二页的数据
  RxList<ApiInfo> _secondPageInfos = RxList([]);

  /// 参数第二页的数据 下拉的数据
  RxList<ApiInfo> _secondPageSelectInfos = RxList([]);

  /// 参数第三页的数据
  RxList<ApiInfo> _thirdPageInfos = RxList([]);

  /// 参数第四页的数据
  RxList<ApiInfo> _forthPageInfos = RxList([]);

  /// 参数第五页的数据
  RxList<ApiInfo> _fifthPageInfos = RxList([]);

  /// 所有Function参数 第一页的内容
  RxList<ApiInfo> _allFunctionInfos = RxList([]);

  /// 当前页数
  RxInt _currectPageIndex = RxInt(1);

  /// 所有keyBoard参数 第一页的数据
  RxList<ApiInfo> _allKeyBoardApiInfos = RxList([]);

  /// 选中模式
  RxList<ApiInfo> _availableModeInfos = RxList([]);

  /// 所有探头
  RxList<Probe> _allProbeDatas = RxList([]);

  /// 当前选择的探头
  RxString _currentProbe = RxString('');

  ///设备信息（远程控制中使用）
  DeviceStateModel? get deviceExtendInfoDTO => _deviceExtendInfoDTO.value;
  set deviceExtendInfoDTO(DeviceStateModel? v) =>
      _deviceExtendInfoDTO.value = v;

  ///超声机桌面频道
  IPlayChannel? get deviceDesktopChannel => _deviceDesktopChannel.value;
  set deviceDesktopChannel(IPlayChannel? v) => _deviceDesktopChannel.value = v;

  String get deviceCode => _deviceCode.value;
  set deviceCode(String v) => _deviceCode.value = v;

  String get consultationCode => _consultationCode.value;
  set consultationCode(String v) => _consultationCode.value = v;

  ///是否会诊中调参
  bool isLiveConsultationController = false;

  int measureToolsTab = 0;

  /// 是否有探头
  bool get isSensorDataAvailable => _isSensorDataAvailable.value;
  set isSensorDataAvailable(bool v) => _isSensorDataAvailable.value = v;

  /// 探头和应用数据
  Map<String, dynamic> get probeData => _probeData;
  set probeData(Map<String, dynamic> v) => _probeData.value = v;

  /// 模式和参数
  Map<String, dynamic>? descriptionData;

  /// 所有探头
  List<Probe> get allProbeDatas => _allProbeDatas;
  set allProbeDatas(List<Probe> v) => _allProbeDatas.value = v;

  /// 探头下所有应用
  List<ApplicationInfo> get allApplyDatas => _allApplyDatas;
  set allApplyDatas(List<ApplicationInfo> v) => _allApplyDatas.value = v;

  /// 当前页数
  int get currectPageIndex => _currectPageIndex.value;
  set currectPageIndex(int v) => _currectPageIndex.value = v;

  /// 所有模式
  List<ApiInfo> get allModes => _allModes;
  set allModes(List<ApiInfo> v) => _allModes.value = v;

  /// 选中模式
  List<ApiInfo> get availableModeInfos => _availableModeInfos;
  set availableModeInfos(List<ApiInfo> v) => _availableModeInfos.value = v;

  /// 所有Function参数 第一页的内容
  List<ApiInfo> get allFunctionInfos => _allFunctionInfos;
  set allFunctionInfos(List<ApiInfo> v) => _allFunctionInfos.value = v;

  /// 所有keyBoard参数 第一页的数据
  List<ApiInfo> get allKeyBoardApiInfos => _allKeyBoardApiInfos;
  set allKeyBoardApiInfos(List<ApiInfo> v) => _allKeyBoardApiInfos.value = v;

  /// 参数第二页的数据
  List<ApiInfo> get secondPageInfos => _secondPageInfos;
  set secondPageInfos(List<ApiInfo> v) => _secondPageInfos.value = v;

  /// 参数第二页的数据 俩种数据源 下拉的数据
  List<ApiInfo> get secondPageSelectInfos => _secondPageSelectInfos;
  set secondPageSelectInfos(List<ApiInfo> v) =>
      _secondPageSelectInfos.value = v;

  /// 参数第三页的数据
  List<ApiInfo> get thirdPageInfos => _thirdPageInfos;
  set thirdPageInfos(List<ApiInfo> v) => _thirdPageInfos.value = v;

  /// 参数第四页的数据
  List<ApiInfo> get forthPageInfos => _forthPageInfos;
  set forthPageInfos(List<ApiInfo> v) => _forthPageInfos.value = v;

  /// 参数第五页的数据
  List<ApiInfo> get fifthPageInfos => _fifthPageInfos;
  set fifthPageInfos(List<ApiInfo> v) => _fifthPageInfos.value = v;

  /// 当前选择的探头
  String get currentProbe => _currentProbe.value;
  set currentProbe(String v) => _currentProbe.value = v;

  /// 当前选择的应用
  String get currentApply => _currentApply.value;
  set currentApply(String v) => _currentApply.value = v;

  /// 当前选择的模式
  String get currentSelectedMode => _currentSelectedMode.value;
  set currentSelectedMode(String v) => _currentSelectedMode.value = v;

  /// 总共多少页数
  int get totalPage => _totalPage.value;
  set totalPage(int v) => _totalPage.value = v;
}
