#pragma once

#include <cstdint>
#include <string>

#include "features/items/contracts/ItemCommandTypes.h"
#include "features/quests/contracts/QuestTypes.h"

namespace ta::presentation
{
    class ActionFeedbackPresenter final
    {
    public:
        enum class Status
        {
            Idle,
            Pending,
            Success,
            Failed
        };

        ActionFeedbackPresenter() = delete;

        [[nodiscard]] static std::uint64_t begin(const std::string& key,
                                                 const std::string& label,
                                                 const std::string& feature,
                                                 const std::string& detail = {});
        static void update();
        static void draw_toasts();
        static void reset() noexcept;

        [[nodiscard]] static Status status(const std::string& key);
        [[nodiscard]] static bool is_pending(const std::string& key);
        [[nodiscard]] static std::string status_text(const std::string& key);

        [[nodiscard]] static const char* item_action_key(
            ta::features::items::contracts::PendingAction action) noexcept;
        [[nodiscard]] static const char* quest_action_key(
            ta::features::quests::contracts::QuestAction action) noexcept;
    };
}
