#pragma once

#include <set>
#include <vector>

#include "adapters/eft/quests/conditions/QuestConditionGraph.h"

namespace ta::adapters::eft::quests
{
    struct QuestCounterWrite
    {
        Il2CppObject* counter = nullptr;
        int value = 0;
    };

    struct QuestItemSpawn
    {
        std::string template_id;
        int count = 0;
    };

    struct QuestCompletionPlan
    {
        std::vector<QuestCounterWrite> counter_writes;
        std::vector<ta::adapters::eft::common::EftMongoId> completed_ids;
        std::vector<QuestItemSpawn> item_spawns;
    };

    class QuestCompletionPlanner final
    {
    public:
        [[nodiscard]] static QuestCompletionPlan complete_all(const QuestConditionGraph& graph);
        [[nodiscard]] static QuestCompletionPlan complete_selected(
            const QuestConditionGraph& graph,
            const std::set<std::string>& selected_ids);
    };
}
