import 'package:injectable/injectable.dart';
import 'package:krow/core/data/models/staff/bank_acc.dart';
import 'package:krow/features/profile/bank_account/data/bank_account_api_provider.dart';
import 'package:krow/features/profile/bank_account/data/bank_account_repository.dart';

@Singleton(as: BankAccountRepository)
class BankAccountRepositoryImpl implements BankAccountRepository {
  final BankAccountApiProvider _apiProvider;

  BankAccountRepositoryImpl({required BankAccountApiProvider apiProvider})
      : _apiProvider = apiProvider;

  @override
  Stream<BankAcc?> getStaffBankAcc() {
    return _apiProvider.getStaffBankAcc();
  }

  @override
  Future<void> putBankAcc(BankAcc acc) {
    return _apiProvider.putBunkAccount(acc);
  }
}
