import 'package:hmg_patient_app/core/enum/viewstate.dart';
import 'package:hmg_patient_app/core/model/contactus/get_patientI_cprojects.dart';
import 'package:hmg_patient_app/core/service/contactus/livechat_service.dart';

import '../../../locator.dart';
import '../base_view_model.dart';


class LiveChatViewModel extends BaseViewModel{



  LiveChatService  _liveChatService =locator<LiveChatService>();

  List<GetPatientICProjectsModel> get LiveChatModelList=>

     _liveChatService.LivechatModelList;


  getLiveChatRequestOrders() async {
    setState(ViewState.Busy);

    await _liveChatService.getAllLiveChatOrders();

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



}