import 'package:logger/logger.dart';
import 'package:rasadyar_core/core.dart';
import 'package:rasadyar_core/data/services/network_status.dart';

final diCore = GetIt.instance;

Future<void> setupAllCoreProvider() async {
  diCore.registerSingleton<Logger>(Logger());
  await _setupLocalStorage();
  diCore.registerSingleton<NetworkStatus>(NetworkStatus()..startListening());
  diCore.registerSingleton<ImagePicker>(ImagePicker());

  //max 500MB Map Cashing
//  await FMTCObjectBoxBackend().initialise();

  await diCore.allReady();
}


Future<void> _setupLocalStorage() async {
  var localStorage = diCore.registerSingleton<HiveLocalStorage>(HiveLocalStorage());
  await localStorage.init();
}
