// import 'package:flutter_secure_storage/flutter_secure_storage.dart';
import 'package:internet_connection_checker/internet_connection_checker.dart';
import 'package:shared_preferences/shared_preferences.dart';
import 'package:http/http.dart' as http;

import '../core/networkchecker/network_info.dart';
import 'di.dart';

void registerCommonDependencies() async {
  final sharedPreferences = await SharedPreferences.getInstance();
  // const secureStorage = FlutterSecureStorage();

  sl.registerLazySingleton(() => sharedPreferences);
  // sl.registerLazySingleton(() => secureStorage);
  sl.registerLazySingleton(() => http.Client());
  sl.registerLazySingleton(() => InternetConnectionChecker());

  // Register NetworkInfo
  sl.registerLazySingleton<NetworkInfo>(() => NetworkInfoImpl(sl()));
}
