import 'package:hmg_patient_app/uitl/translations_delegate_base.dart';
import 'package:flutter/cupertino.dart';

enum Ambulate { Wheelchair, Walker, Stretcher, None }

extension SelectedAmbulate on Ambulate {
  String getAmbulateTitle(BuildContext context) {
    switch (this) {
      case Ambulate.Wheelchair:
        return TranslationBase.of(context).wheelchair;
        break;
      case Ambulate.Walker:
        return TranslationBase.of(context).walker;
        break;
      case Ambulate.Stretcher:
        return TranslationBase.of(context).stretcher;
        break;
      case Ambulate.None:
        return TranslationBase.of(context).none;
        break;
    }
    return TranslationBase.of(context).none;
  }

  int selectAmbulateNumber() {
    switch (this) {
      case Ambulate.Wheelchair:
        return 0;
        break;
      case Ambulate.Walker:
        return 1;
        break;
      case Ambulate.Stretcher:
        return 2;
        break;
      case Ambulate.None:
        return 3;
        break;
    }
    return 3;
  }

  Ambulate getAmbulateById(int id) {
    switch (id) {
      case 0:
        return Ambulate.Wheelchair;
        break;
      case 1:
        return Ambulate.Walker;
        break;
      case 2:
        return Ambulate.Stretcher;
        break;
      case 3:
        return Ambulate.None;
        break;
    }

    return Ambulate.None;
  }
}
