import 'package:rasadyar_auth/data/di/auth_di.dart';
import 'package:rasadyar_auth/data/services/token_storage_service.dart';
import 'package:rasadyar_chicken/data/repositories/chicken_repository_imp.dart';
import 'package:rasadyar_core/core.dart';

GetIt diChicken = GetIt.instance;

Future<void> setupChickenDI() async {
  var tokenService = Get.find<TokenStorageService>();

  diAuth.registerLazySingleton<DioRemote>(() => DioRemote(baseUrl: tokenService.baseurl.value));
  final dioRemote = diAuth.get<DioRemote>();
  await dioRemote.init();
  diAuth.registerLazySingleton<ChickenRepositoryImpl>(() => ChickenRepositoryImpl(dioRemote));

  diChicken.registerSingleton(ImagePicker());
}
