import 'package:fis_common/logger/logger.dart';
import 'package:flyinsono/managers/interfaces/appointment_consultation.dart';
import 'package:flyinsono/views/desktop/real_time_consultation/state.dart';
import 'package:get/get.dart';

import 'real_time_consultation_controller.dart';

class RealTimeConsultationImageController {
  final RealTimeConsultationController controller;
  late final RealTimeConsultationState state;
  final appointmentConsultationManager = Get.find<IAppointmentConsultation>();
  RealTimeConsultationImageController(this.controller) {
    state = controller.state;
  }

  ///获取会诊图像
  Future<void> getConsultationImages(String consultationCode) async {
    try {
      state.realTimeConsultationImageList = await appointmentConsultationManager
          .getConsultationImages(consultationCode);
    } catch (e) {
      logger.e('RealTimeConsultationImageController getConsultationImages ex:' +
          e.toString());
    }
  }
}
