import 'package:driverapp/core/service/delivery_tracking_services.dart';
import 'package:get_it/get_it.dart';

import 'core/service/authentication_service.dart';
import 'core/service/hospital_service.dart';
import 'core/service/orders_service.dart';
import 'core/viewModels/authentication_view_model.dart';
import 'core/viewModels/hospital_view_model.dart';
import 'core/viewModels/orders_view_model.dart';

GetIt locator = GetIt.instance;

///di
void setupLocator() {
  /// Services
  locator.registerLazySingleton(() => HospitalService());
  locator.registerLazySingleton(() => AuthenticationService());
  locator.registerLazySingleton(() => OrdersService());
  locator.registerLazySingleton(() => DeliveryTrackingServices());

  /// View Model
  locator.registerFactory(() => HospitalViewModel());
  locator.registerFactory(() => AuthenticationViewModel());
  locator.registerFactory(() => OrdersViewModel());
}
