import 'package:injectable/injectable.dart';
import 'package:krow/features/check_list/data/check_list_api_provider.dart';
import 'package:krow/features/check_list/domain/check_list_repository.dart';

@Injectable(as: CheckListRepository)
class CheckListRepositoryImpl implements CheckListRepository {
  final CheckListApiProvider remoteDataSource;

  CheckListRepositoryImpl({required this.remoteDataSource});

  @override
  Stream<Map<String, dynamic>> getCheckList() {
    return remoteDataSource.fetchCheckListWithCache();
  }

  @override
  Future<Map<String, dynamic>> getCheckListUpdate() {
    return remoteDataSource.fetchCheckList();
  }

  @override
  Future<void> submitVerification() async {
    return remoteDataSource.submitVerification();
  }
}
