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 {
  await _setUpLogger();
  await _setupLocalStorage();
  await _setupRemote();
  diCore.registerSingleton(NetworkStatus()..startListening());

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




  await diCore.allReady();
}

Future<void> _setUpLogger() async {
  diCore.registerSingleton<Logger>(Logger());
}

Future<void> _setupLocalStorage() async {
  diCore.registerSingleton<HiveLocalStorage>(HiveLocalStorage());
}

Future<void> _setupRemote() async {
  //  diCore.registerSingleton<HiveLocalStorage>(HiveLocalStorage());
}
