package cz.cvut.fel.omo.hw.functions.statistics;

import cz.cvut.fel.omo.hw.functions.data.model.*;
import cz.cvut.fel.omo.hw.functions.utils.CandidateUtils;
import cz.cvut.fel.omo.hw.functions.utils.CandidateUtilsImpl;
import cz.cvut.fel.omo.hw.functions.utils.ElectionsUtils;
import cz.cvut.fel.omo.hw.functions.utils.ElectionsUtilsImpl;

import java.util.Comparator;
import java.util.List;
import java.util.Map;
import java.util.concurrent.CompletableFuture;
import java.util.stream.Collectors;

public class ElectionStatisticsImpl implements ElectionStatistics {

    private final ElectionsUtils electionsUtils;
    private final CandidateUtils candidateUtils;

    public ElectionStatisticsImpl(CompletableFuture<List<RegionResults>> regionResultsFuture, CompletableFuture<AbroadResults> abroadResultsFuture, CompletableFuture<Candidates> candidatesFuture) {
        this.candidateUtils = new CandidateUtilsImpl(candidatesFuture);
        this.electionsUtils = new ElectionsUtilsImpl(regionResultsFuture, abroadResultsFuture);
    }

    @Override
    public int getTotalValidVotes() {
        // TODO Homework
        return 0;
    }

    @Override
    public int getTotalInvalidVotes() {
        // TODO Homework
        return 0;
    }

    @Override
    public int getTotalVoterCount() {
        // TODO Homework
        return 0;
    }

    @Override
    public int getTotalIssuedEnvelopes() {
        // TODO Homework
        return 0;
    }

    @Override
    public double getTotalVoterTurnout() {
        // TODO Homework
        return 0;
    }

    @Override
    public Map<String, Integer> getCandidateVotesMap() {
        // TODO Homework
        return null;
    }

    @Override
    public Map<String, Double> getCandidateVotesPercentMap() {
        // TODO Homework
        return null;
    }

    @Override
    public String getCandidatesByVotesDesc() {
        // TODO Homework
        return null;
    }

}
