import 'package:flyinsono/lab/manager/interfaces/ai_diagnosis.dart';
import 'package:flyinsono/rpc.dart';
import 'package:fis_jsonrpc/rpc.dart';
import 'package:fis_common/logger/logger.dart';
import 'base_manager.dart';

class AIDiagnosisManager extends BaseManager implements IAIDiagnosisManager {
  @override
  Future<VetAutoTraceImageResult?> getAutoTraceImageData({
    required VetAutoTraceImageDTO imageInfo,
    VetAutoTraceRectDTO? rectInfo,
  }) async {
    try {
      return await rpc.aIDiagnosis.vetAutoTraceImageAsync(
        VetAutoTraceImageRequest(
          token: token,
          imageInfo: imageInfo,
          rectInfo: rectInfo,
        ),
      );
    } catch (e) {
      logger.e('Project getAutoTraceImageData ex:', e);

      return null;
    }
  }
}
