import 'package:fis_ui/index.dart';
import 'package:fis_jsonrpc/rpc.dart';
import 'package:flutter/material.dart';
import 'package:flyinsono/managers/base_manager.dart';

import 'interfaces/ai_manager.dart';

class AIManager extends BaseManager implements IAIManager {
  @override
  Color getAIIconColor(DiagnosisConclusionEnum diagnosisConclusion,
      DiagnosisOrganEnum diagnosisOrgan) {
    ///颈动脉不存在恶性和良恶性，所以做这个处理
    if (diagnosisOrgan == DiagnosisOrganEnum.CarotidArtery &&
        diagnosisConclusion.index > DiagnosisConclusionEnum.Benign.index) {
      diagnosisConclusion = DiagnosisConclusionEnum.NoObviousLesion;
    }
    switch (diagnosisConclusion) {
      case DiagnosisConclusionEnum.NoObviousLesion:
        return Colors.lightBlue;
      case DiagnosisConclusionEnum.Benign:
        return Colors.greenAccent;
      case DiagnosisConclusionEnum.BenignAndMalignant:
      case DiagnosisConclusionEnum.Malignant:
        return Colors.orangeAccent;
      case DiagnosisConclusionEnum.Other:
        return Colors.lightBlue;
      default:
        return Colors.black;
    }
  }

  @override
  IconData getAiIconItem(DiagnosisOrganEnum diagnosisOrganEnum) {
    switch (diagnosisOrganEnum) {
      case DiagnosisOrganEnum.Breast:
        return FIcons.mammary_gland;
      case DiagnosisOrganEnum.Liver:
        return FIcons.liver;
      case DiagnosisOrganEnum.Kidney:
        return FIcons.fis_kidney;
      case DiagnosisOrganEnum.Cholecyst:
        return FIcons.fis_gallbladder;
      case DiagnosisOrganEnum.Spleen:
        return FIcons.fis_spleen;
      case DiagnosisOrganEnum.Thyroid:
        return FIcons.fis_thyroid;
      case DiagnosisOrganEnum.CarotidArtery:
        return FIcons.arteria_carotis;
      default:
        // 图像待定
        return FIcons.arteria_carotis;
    }
    // return
  }
}
