import 'package:doctor_app_flutter/utils/translations_delegate_base_utils.dart';
import 'package:flutter/material.dart';

enum ProcedureType {
  PROCEDURE,
  LAB_RESULT,
  RADIOLOGY,
  PRESCRIPTION,
}

extension procedureType on ProcedureType {
  String getFavouriteTabName(BuildContext context) {
    return TranslationBase.of(context).favoriteTemplates;
  }

  String getAllLabelName(BuildContext context) {
    switch (this) {
      case ProcedureType.PROCEDURE:
        return TranslationBase.of(context).allProcedures;
      case ProcedureType.LAB_RESULT:
        return TranslationBase.of(context).allLab;
      case ProcedureType.RADIOLOGY:
        return TranslationBase.of(context).allRadiology;
      case ProcedureType.PRESCRIPTION:
        return TranslationBase.of(context).allPrescription;
      default:
        return "";
    }
  }

  String getToolbarLabel(BuildContext context) {
    switch (this) {
      case ProcedureType.PROCEDURE:
        return TranslationBase.of(context).addProcedures;
      case ProcedureType.LAB_RESULT:
        return TranslationBase.of(context).addLabOrder;
      case ProcedureType.RADIOLOGY:
        return TranslationBase.of(context).addRadiologyOrder;
      case ProcedureType.PRESCRIPTION:
        return TranslationBase.of(context).addPrescription;
      default:
        return "";
    }
  }

  String getAddButtonTitle(BuildContext context) {
    switch (this) {
      case ProcedureType.PROCEDURE:
        return TranslationBase.of(context).addProcedures;
      case ProcedureType.LAB_RESULT:
        return TranslationBase.of(context).addLabOrder;
      case ProcedureType.RADIOLOGY:
        return TranslationBase.of(context).addRadiologyOrder;
      case ProcedureType.PRESCRIPTION:
        return TranslationBase.of(context).addPrescription;
      default:
        return "";
    }
  }

  String getCategoryId() {
    switch (this) {
      case ProcedureType.PROCEDURE:
        return "";
      case ProcedureType.LAB_RESULT:
        return "02";
      case ProcedureType.RADIOLOGY:
        return "03";
      case ProcedureType.PRESCRIPTION:
        return "55";
      default:
        return "";
    }
  }

  String getCategoryName() {
    switch (this) {
      case ProcedureType.PROCEDURE:
        return "";
      case ProcedureType.LAB_RESULT:
        return "Laboratory";
      case ProcedureType.RADIOLOGY:
        return "Radiology";
      default:
        return "";
    }
  }
}
