import 'package:get_it/get_it.dart';
import 'package:mnemo_cards/features/packs/preview_pack_holder.dart';
import 'package:mnemo_cards/features/packs/preview_packs_poller.dart';
import 'package:mnemo_cards/managers/favorite_cards.dart';
import 'package:mnemo_cards/managers/repository/http_repository.dart';

import '../features/packs/images_holder.dart';
import '../features/packs/pack_cache_manager.dart';
import '../features/packs/pack_updater.dart';
import '../features/purchase/in_app_purchase.dart';
import '../features/packs/pack_manager.dart';
import '../features/tests/test_manager.dart';
import '../managers/user_manager.dart';
import 'injector.dart';

const locator = Locator();

class Locator {
  GetIt get _getIt => getIt;

  const Locator();

  HttpRepository get repository => _getIt.get<HttpRepository>();

  PackManager get packManager => _getIt.get<PackManager>();

  UserManager get userManager => _getIt.get<UserManager>();

  FavoriteCardsController get favoriteCardsController =>
      _getIt.get<FavoriteCardsController>();

  PackCacheManager get packCacheManager => _getIt.get<PackCacheManager>();

  PackUpdater get packUpdater => _getIt.get<PackUpdater>();

  PreviewPackHolder get previewPackHolder => _getIt.get<PreviewPackHolder>();

  PreviewPacksPoller get previewPackPoller => _getIt.get<PreviewPacksPoller>();

  TestManager get testManager => _getIt.get<TestManager>();

  ImagesHolder get imagesHolder => _getIt.get<ImagesHolder>();

  InAppPurchaseService get purchaseService =>
      _getIt.get<InAppPurchaseService>();
}
