import 'package:mnemo_cards/managers/user_manager.dart';
import 'package:mnemo_cards_common/mnemo_cards_common.dart';

import '../../features/purchase/in_app_purchase.dart';

abstract class Repository {
  Future<UserDto> get user;

  Stream<UserDto> get userStream;

  Future<void> updateUser(UserDto dto);

  Future<(UserDto, String)> createOrGetUser(
    String externalId,
    ExternalIdType idType,
    String name,
  );

  Future<UserDto?> getUser();

  Future<void> updateUserData(UserDataDto data);

  Future<void> updateUserSettings(UserSettingsDto settings);

  Future<void> addTestStatistics(TestStatisticsDto testStatistics);

    Future<List<TestDto>> getTests();

  Future<TestDto?> getTest(String id);

  Future<bool> checkPayment(
    String itemId,
    String key,
    PaymentSystem PaymentSystem,
  );

  Future<bool> checkUserPayment();

  Future<String?> createPayment(String id, PaymentSystem type);
}
