
import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
import 'package:diplomaticquarterapp/core/model/er/get_all_transportation_method_list_model.dart';
import 'package:diplomaticquarterapp/core/service/er/am_service.dart';
import 'package:diplomaticquarterapp/core/viewModels/base_view_model.dart';
import '../base_view_model.dart';
import '../../../locator.dart';

class AmRequestViewModel extends BaseViewModel{


  AmService _amService = locator<AmService>();

  List<PatientER_RRT_GetAllTransportationMethodListModel> get AmRequestModeList=>
      _amService.AmModelList;

  getAmRequestOrders({int id, int projectID}) async {
    setState(ViewState.Busy);


      await _amService.getAllTransportationOrders();

    if ( _amService.hasError) {
      error =  _amService.error;
      setState(ViewState.Error);
    } else
      setState(ViewState.Idle);
  }



}