import 'package:tm_app/core/utils/result.dart';
import 'package:tm_app/data/services/home_service.dart';
import 'package:tm_app/data/services/model/recommended_tenders_response/recommended_tenders_response.dart';
import 'package:tm_app/data/services/model/tender_approvals_response/tender_approvals_response.dart';
import 'package:tm_app/data/services/model/tender_approvals_stats_response/tender_approvals_stats_response.dart';

import '../services/model/feedback_stats_response/feedback_stat_response.dart';
import '../services/model/request_models/get_tenders_request_model/get_tenders_request_model.dart';
import '../services/your_tenders_service.dart';

class HomeRepository {
  HomeRepository({
    required HomeService homeService,
    required YourTendersService yourTendersService,
  }) : _homeService = homeService,
       _yourTendersService = yourTendersService;
  final HomeService _homeService;
  final YourTendersService _yourTendersService;

  Future<Result<RecommendedTendersResponse>> getHomeRecommendedTenders({
    required int limit,
    required int offset,
  }) async {
    return _homeService.getRecommendedTenders(limit: limit, offset: offset);
  }

  Future<Result<TenderApprovalsResponse>> getYourTenders({
    required GetTendersRequestModel requestModel,
  }) {
    return _yourTendersService.getTenders(requestModel: requestModel);
  }

  Future<Result<TenderApprovalsStatsResponse>> getTendersApprovalsStats() {
    return _homeService.getTendersApprovalsStats();
  }

  Future<Result<FeedbackStatResponse>> getFeedbackStats() {
    return _homeService.getFeedbackStats();
  }
  Future<Result<Map<String, dynamic>>> checkUnreadNotifications() async {
  return _homeService.checkUnreadNotifications();
}

}
