import 'package:hmg_patient_app/core/service/AlHabibMedicalService/H2O_service.dart';
import 'package:hmg_patient_app/core/service/ancillary_orders_service.dart';
import 'package:hmg_patient_app/core/service/client/base_app_client.dart';
import 'package:hmg_patient_app/core/service/parmacyModule/prescription_service.dart';
import 'package:hmg_patient_app/core/service/qr_service.dart';
import 'package:hmg_patient_app/core/viewModels/AlHabibMedicalService/H2O_view_model.dart';
import 'package:hmg_patient_app/core/viewModels/AlHabibMedicalService/home_health_care_view_model.dart';
import 'package:hmg_patient_app/core/viewModels/ancillary_orders_view_model.dart';
import 'package:hmg_patient_app/core/viewModels/child_vaccines/user_information_view_model.dart';
import 'package:hmg_patient_app/core/viewModels/dashboard_view_model.dart';
import 'package:hmg_patient_app/core/viewModels/pharmacyModule/MostViewedViewModel.dart';
import 'package:hmg_patient_app/core/viewModels/pharmacyModule/PharmacyAddressesViewModel.dart';
import 'package:hmg_patient_app/core/viewModels/product_categories_view_model.dart';
import 'package:hmg_patient_app/core/viewModels/pharmacyModule/order_model_view_model.dart';
import 'package:hmg_patient_app/core/viewModels/weather/weather_view_model.dart';
import 'package:hmg_patient_app/services/payfort_services/payfort_service.dart';
import 'package:hmg_patient_app/services/payfort_services/payfort_view_model.dart';
import 'package:hmg_patient_app/services/pharmacy_services/cancelOrder_service.dart';
import 'package:hmg_patient_app/services/pharmacy_services/order_service.dart';
import 'package:hmg_patient_app/services/pharmacy_services/recommendedProduct_service.dart';
// import 'package:hmg_patient_app/core/viewModels/pharmacyModule/PharmacyAddressesViewModel.dart';
// import 'package:hmg_patient_app/core/viewModels/pharmacyModule/order_model_view_model.dart';
// import 'package:hmg_patient_app/services/pharmacy_services/order_service.dart';
import 'package:hmg_patient_app/services/pharmacy_services/review_service.dart';
import 'package:hmg_patient_app/services/pharmacy_services/wishList_service.dart';
import 'package:hmg_patient_app/uitl/navigation_service.dart';
import 'package:flutter_local_notifications/flutter_local_notifications.dart';
import 'package:get_it/get_it.dart';

import 'analytics/google-analytics.dart';
import 'core/service/AlHabibMedicalService/cmc_service.dart';
import 'core/service/AlHabibMedicalService/customer_addresses_service.dart';
import 'core/service/AlHabibMedicalService/e_referral_service.dart';
import 'core/service/AlHabibMedicalService/health-calculator/bariatrics-service.dart';
import 'core/service/AlHabibMedicalService/home_health_care_service.dart';
import 'core/service/AuthenticatedUserObject.dart';
import 'core/service/PrescriptionDeliveryService.dart';
import 'core/service/appointment_rate_service.dart';
import 'core/service/blood/blood_details_servies.dart';
import 'core/service/blood/blood_donation_service.dart';
import 'core/service/childvaccines/add_new_child_service.dart';
import 'core/service/childvaccines/child_vaccines_service.dart';
import 'core/service/childvaccines/delete_baby_service.dart';
import 'core/service/childvaccines/user_information_service.dart';
import 'core/service/childvaccines/vaccination_table_service.dart';
import 'core/service/contactus/finadus_service.dart';
import 'core/service/contactus/livechat_service.dart';
import 'core/service/dashboard_service.dart';
import 'core/service/er/EdOnlineServices.dart';
import 'core/service/er/am_service.dart';
import 'core/service/er/er_service.dart';
import 'core/service/feedback/feedback_service.dart';
import 'core/service/geofencing/GeofencingServices.dart';
import 'core/service/hospital_service.dart';
import 'core/service/insurance_service.dart';
import 'core/service/medical/ActiveMedicationsService.dart';
import 'core/service/medical/AllergiesService.dart';
import 'core/service/medical/BloodPressureService.dart';
import 'core/service/medical/BloodSugarService.dart';
import 'core/service/medical/EyeService.dart';
import 'core/service/medical/PatientSickLeaveService.dart';
import 'core/service/medical/WeightPressureService.dart';
import 'core/service/medical/ask_doctor_services.dart';
import 'core/service/medical/labs_service.dart';
import 'core/service/medical/medical_service.dart';
import 'core/service/medical/my_balance_service.dart';
import 'core/service/medical/my_doctor_service.dart';
import 'core/service/medical/prescriptions_service.dart';
import 'core/service/medical/radiology_service.dart';
import 'core/service/medical/reports_monthly_service.dart';
import 'core/service/medical/reports_service.dart';
import 'core/service/medical/vital_sign_service.dart';
import 'core/service/notifications_service.dart';
import 'core/service/offers_service.dart';
import 'core/service/packages_offers/PackagesOffersServices.dart';
import 'core/service/parmacyModule/lacum-registration-service.dart';
import 'core/service/parmacyModule/lacum-service.dart';
import 'core/service/parmacyModule/lacum-transfer-service.dart';
import 'core/service/parmacyModule/order-preview-service.dart';
import 'core/service/parmacyModule/parmacy_module_service.dart';
import 'core/service/parmacyModule/terms-condition-service.dart';
import 'core/service/pharmacies_service.dart';
import 'core/service/pharmacy_categorise_service.dart';
import 'core/service/privilege_service.dart';
import 'core/service/termsConditionsService.dart';
import 'core/service/vaccine_service.dart';
import 'core/service/weather_service.dart';
import 'core/viewModels/AlHabibMedicalService/cmc_view_model.dart';
import 'core/viewModels/AlHabibMedicalService/health-calculator/Bariatrics-viewmodel.dart';
import 'core/viewModels/TermsConditionsViewModel.dart';
import 'core/viewModels/all_habib_medical_services/e_referral_view_model.dart';
import 'core/viewModels/appointment_rate_view_model.dart';
import 'core/viewModels/blooddonation/blood_details_view_model.dart';
import 'core/viewModels/blooddonation/booddonation_view_model.dart';
import 'core/viewModels/child_vaccines/add_new_child_view_model.dart';
import 'core/viewModels/child_vaccines/child_vaccines_view_model.dart';
import 'core/viewModels/child_vaccines/vaccination_table_view_model.dart';
import 'core/viewModels/contactus/findus_view_model.dart';
import 'core/viewModels/contactus/livechat_view_model.dart';
import 'core/viewModels/er/EdOnlineViewModel.dart';
import 'core/viewModels/er/am_request_view_model.dart';
import 'core/viewModels/er/near_hospital_view_model.dart';
import 'core/viewModels/er/rrt-view-model.dart';
import 'core/viewModels/feedback/feedback_view_model.dart';
import 'core/viewModels/hospital_view_model.dart';
import 'core/viewModels/insurance_card_View_model.dart';
import 'core/viewModels/medical/ActiveMedicationsViewModel.dart';
import 'core/viewModels/medical/AllergiesViewModel.dart';
import 'core/viewModels/medical/EyeViewModel.dart';
import 'core/viewModels/medical/PrescriptionDeliveryViewModel.dart';
import 'core/viewModels/medical/ask_doctor_view_model.dart';
import 'core/viewModels/medical/blood_pressure_view_model.dart';
import 'core/viewModels/medical/blood_sugar_view_model.dart';
import 'core/viewModels/medical/labs_view_model.dart';
import 'core/viewModels/medical/medical_view_model.dart';
import 'core/viewModels/medical/my_balance_view_model.dart';
import 'core/viewModels/medical/my_doctor_view_model.dart';
import 'core/viewModels/medical/patient_sick_leave_view_model.dart';
import 'core/viewModels/medical/prescriptions_view_model.dart';
import 'core/viewModels/medical/radiology_view_model.dart';
import 'core/viewModels/medical/reports_monthly_view_model.dart';
import 'core/viewModels/medical/reports_view_model.dart';
import 'core/viewModels/medical/vital_sign_view_model.dart';
import 'core/viewModels/medical/weight_pressure_view_model.dart';
import 'core/viewModels/notifications_view_model.dart';
import 'core/viewModels/offers_Categorise_view_model.dart';
import 'core/viewModels/packages_offers/PackagesOffersViewModel.dart';
import 'core/viewModels/pharmacies_view_model.dart';
import 'core/viewModels/pharmacyModule/OrderPreviewViewModel.dart';
import 'core/viewModels/pharmacyModule/BestSellerViewModel.dart';
import 'core/viewModels/pharmacyModule/BrandViewModel.dart';
import 'core/viewModels/pharmacyModule/LastVisitedViewModel.dart';
import 'core/viewModels/pharmacyModule/PrescriptionViewModel.dart';
import 'core/viewModels/pharmacyModule/brand_view_model.dart';
import 'core/viewModels/pharmacyModule/lacum-registration-viewModel.dart';
import 'core/viewModels/pharmacyModule/lacum-trasnfer-viewModel.dart';
import 'core/viewModels/pharmacyModule/lacum-viewmodel.dart';
import 'core/viewModels/pharmacyModule/pharmacy_module_view_model.dart';
import 'core/viewModels/pharmacyModule/product_detail_view_model.dart';
import 'core/viewModels/pharmacyModule/review_view_model.dart';
import 'core/viewModels/pharmacyModule/tems-condition-viewmodel.dart';
import 'core/viewModels/pharmacyModule/wishlist_view_model.dart';
import 'core/viewModels/pharmacy_categorise_view_model.dart';
import 'core/viewModels/qr_view_model.dart';
import 'core/viewModels/vaccine_view_model.dart';
import 'core/viewModels/weather/weather_view_model.dart';
import 'services/pharmacy_services/brands_service.dart';
import 'services/pharmacy_services/orderDetails_service.dart';
import 'services/pharmacy_services/pharmacyAddress_service.dart';
import 'services/pharmacy_services/product_detail_service.dart';

GetIt locator = GetIt.instance;

///di
void setupLocator() {
  /// Others
  locator.registerLazySingleton(() => FlutterLocalNotificationsPlugin());

  /// Services
  locator.registerLazySingleton(() => AuthenticatedUserObject());
  locator.registerLazySingleton(() => HospitalService());
  locator.registerLazySingleton(() => PharmacyService());
  locator.registerLazySingleton(() => MyDoctorService());
  locator.registerLazySingleton(() => PrescriptionsService());
  locator.registerLazySingleton(() => LabsService());
  locator.registerLazySingleton(() => RadiologyService());
  locator.registerLazySingleton(() => FeedbackService());
  locator.registerLazySingleton(() => InsuranceCardService());
  locator.registerLazySingleton(() => VitalSignService());
  locator.registerLazySingleton(() => MedicalService());
  locator.registerLazySingleton(() => NavigationService());
  locator.registerLazySingleton(() => ReportsService());
  locator.registerLazySingleton(() => DashboardService());
  locator.registerLazySingleton(() => AppointmentRateService());
  locator.registerLazySingleton(() => QrService());
  locator.registerFactory(() => VaccineService());
  locator.registerLazySingleton(() => ReportsMonthlyService());
  locator.registerLazySingleton(() => ErService());
  locator.registerLazySingleton(() => AmService());
  locator.registerLazySingleton(() => EReferralService());
  locator.registerLazySingleton(() => HomeHealthCareService());
  locator.registerLazySingleton(() => CMCService());

  locator.registerLazySingleton(() => PatientSickLeaveService());
  locator.registerLazySingleton(() => MyBalanceService());
  locator.registerLazySingleton(() => BloodSugarService());
  locator.registerLazySingleton(() => BloodPressureService());
  locator.registerLazySingleton(() => WeightService());
  locator.registerLazySingleton(() => EyeService());
  locator.registerLazySingleton(() => ActiveMedicationsService());
  locator.registerLazySingleton(() => AskDoctorService());
  locator.registerLazySingleton(() => AllergiesService());
  locator.registerLazySingleton(() => FindusService());
  locator.registerLazySingleton(() => LiveChatService());
  locator.registerLazySingleton(() => H2OService());

  locator.registerLazySingleton(() => BloodDonationService());
  locator.registerLazySingleton(() => BloodDetailsService());
  locator.registerLazySingleton(() => ChildVaccinesService());
  locator.registerLazySingleton(() => UserInformationService());
  locator.registerLazySingleton(() => CreteNewBabyService());
  locator.registerLazySingleton(() => DeleteBabyService());

  locator.registerLazySingleton(() => VaccinationTableService());
  locator.registerLazySingleton(() => AncillaryOrdersService());
  locator.registerLazySingleton(() => EdOnlineServices());
  locator.registerLazySingleton(() => PayfortService());

  //pharmacy
  // locator.registerLazySingleton(() => PharmacyCategoriseService());
  // locator.registerLazySingleton(() => OffersCategoriseService());
  locator.registerLazySingleton(() => PharmacyCategoriseService());
  locator.registerLazySingleton(() => OffersCategoriseService());

  locator.registerLazySingleton(() => NotificationService());
  locator.registerLazySingleton(() => PharmacyModuleService());
  locator.registerLazySingleton(() => WishListService());
  locator.registerLazySingleton(() => ReviewService());
  locator.registerLazySingleton(() => BrandsService());
  locator.registerLazySingleton(() => ProductDetailService());

  locator.registerLazySingleton(() => OrderPreviewService());
  locator.registerLazySingleton(() => LacumService());
  locator.registerLazySingleton(() => LacumTransferService());
  locator.registerLazySingleton(() => LacumRegistrationService());
  locator.registerLazySingleton(() => OrderService());
  locator.registerLazySingleton(() => PharmacyAddressService());
  locator.registerLazySingleton(() => OrderDetailsService());
  locator.registerLazySingleton(() => CustomerAddressesService());
  // locator.registerLazySingleton(() => TermsConditionService());
  locator.registerLazySingleton(() => TermsConditionService());
  locator.registerLazySingleton(() => CancelOrderService());
  locator.registerLazySingleton(() => PrescriptionService());
  locator.registerLazySingleton(() => RecommendedProductService());

  locator.registerLazySingleton(() => PrivilegeService());
  locator.registerLazySingleton(() => WeatherService());
  locator.registerLazySingleton(() => TermsConditionsService());
  locator.registerLazySingleton(() => BariatricsService());
  locator.registerLazySingleton(() => PrescriptionDeliveryService());

  /// View Model
  locator.registerFactory(() => HospitalViewModel());
  locator.registerFactory(() => PharmacyViewModel());
  locator.registerFactory(() => MyDoctorViewModel());
  locator.registerFactory(() => PrescriptionsViewModel());
  locator.registerFactory(() => ReportsViewModel());
  locator.registerFactory(() => LabsViewModel());
  locator.registerFactory(() => RadiologyViewModel());
  locator.registerFactory(() => FeedbackViewModel());
  locator.registerFactory(() => VaccineViewModel());
  locator.registerFactory(() => VitalSignViewModel());
  locator.registerFactory(() => InsuranceViewModel());
  locator.registerFactory(() => MedicalViewModel());
  locator.registerFactory(() => DashboardViewModel());
  locator.registerFactory(() => AppointmentRateViewModel());
  locator.registerFactory(() => QrViewModel());
  locator.registerFactory(() => ReportsMonthlyViewModel());
  locator.registerFactory(() => NearHospitalViewModel());
  locator.registerFactory(() => RRTViewModel());
  locator.registerFactory(() => AmRequestViewModel());
  locator.registerFactory(() => PatientSickLeaveViewMode());
  locator.registerFactory(() => MyBalanceViewModel());
  locator.registerFactory(() => EReferralViewModel());
  locator.registerFactory(() => FindusViewModel());
  locator.registerFactory(() => LiveChatViewModel());
  locator.registerFactory(() => BloodDonationViewModel());
  locator.registerFactory(() => BloodDeatailsViewModel());
  locator.registerFactory(() => ChildVaccinesViewModel());
  locator.registerFactory(() => UserInformationViewModel());
  locator.registerFactory(() => VaccinationTableViewModel());
  locator.registerFactory(() => OrderModelViewModel());
  locator.registerFactory(() => PharmacyAddressesViewModel());
  locator.registerFactory(() => TermsConditionViewModel());

  locator.registerFactory(() => AddNewChildViewModel());
  locator.registerFactory(() => H2OViewModel());
  locator.registerFactory(() => BloodSugarViewMode());
  locator.registerFactory(() => BloodPressureViewMode());
  locator.registerFactory(() => WeightPressureViewModel());
  locator.registerFactory(() => EyeViewModel());
  locator.registerFactory(() => ActiveMedicationsViewModel());
  locator.registerFactory(() => AskDoctorViewModel());
  locator.registerFactory(() => PrescriptionDeliveryViewModel());

  locator.registerFactory(() => AllergiesViewModel());
  locator.registerFactory(() => HomeHealthCareViewModel());
  locator.registerFactory(() => CMCViewModel());
  locator.registerFactory(() => NotificationViewModel());

  locator.registerFactory(() => PharmacyModuleViewModel());
  locator.registerFactory(() => WishListViewModel());
  locator.registerFactory(() => ReviewViewModel());
  locator.registerFactory(() => BrandsViewModel());
  locator.registerFactory(() => ProductDetailViewModel());
  locator.registerFactory(() => WeatherViewModel());

  // locator.registerFactory(() => OrderPreviewViewModel());
  locator.registerFactory(() => LacumViewModel());
  locator.registerFactory(() => LacumTranferViewModel());
  locator.registerFactory(() => LacumRegistrationViewModel());
  locator.registerFactory(() => EdOnlineViewModel());
  locator.registerFactory(() => ProductCategoriesViewModel());

  //pharmacy
  locator.registerFactory(() => PharmacyCategoriseViewModel());
  locator.registerFactory(() => OffersCategoriseViewModel());
  locator.registerFactory(() => BariatricsViewModel());

  locator.registerFactory(() => PrescriptionViewModel());
  locator.registerFactory(() => BrandViewModel());
  locator.registerFactory(() => BestSellerViewModel());
  locator.registerFactory(() => LastVisitedViewModel());
  locator.registerFactory(() => MostViewedViewModel());
  locator.registerFactory(() => PayfortViewModel());

  // Offer And Packages
  //----------------------
  locator.registerLazySingleton(
      () => OffersAndPackagesServices()); // offerPackagesServices  Service
  locator.registerFactory(
      () => OfferCategoriesViewModel()); // Categories View Model
  locator.registerFactory(() => PackagesViewModel()); // Products View Model

  //pharmacy
  // locator.registerFactory(() => PharmacyCategoriseViewModel());
  // locator.registerFactory(() => OffersCategoriseViewModel());
  // Geofencing
  // ---------------------
  locator.registerLazySingleton(
      () => GeofencingServices()); // Geofencing  Services
  locator.registerFactory(() => TermsConditionsViewModel());
  locator.registerFactory(() => AnciallryOrdersViewModel());


  // Google/Firebase Analytics
  // ---------------------------
  locator.registerFactory(() => GAnalytics());

  locator.registerLazySingleton(() => BaseAppClient());
}
