import 'package:doctor_app_flutter/client/base_app_client.dart';
import 'package:doctor_app_flutter/config/config.dart';
import 'package:flutter/cupertino.dart';

// TODO change it when change login
class HospitalViewModel with ChangeNotifier {
  BaseAppClient baseAppClient = BaseAppClient();

  Future<Map> getProjectsList(memberID) async {
    const url = GET_PROJECTS;
    // TODO create model or remove it  if no info need
    var info = {
      "LanguageID": 1,
      "stamp": "2020-02-26T13:51:44.111Z",
      "IPAdress": "11.11.11.11",
      "VersionID": 1.2,
      "Channel": 9,
      "TokenID": "",
      "SessionID": "i1UJwCTSqt",
      "IsLoginForDoctorApp": true,
      "MemberID": memberID
    };
    dynamic localRes;

    await baseAppClient.post(url, onSuccess: (response, statusCode) async {
      localRes = response;
    }, onFailure: (String error, int statusCode) {
      throw error;
    }, body: info);
    return Future.value(localRes);
  }
}
