#pragma once

#include "proxy.h"

#include <unordered_set>
#include <string>

#include <nlohmann/json_fwd.hpp>

class Spoofer
{
    public:
        void init(Proxy* proxy);

    private:
        void registerListeners(Proxy* proxy);
        void loadData();

        void parseCatalog(std::string data);

        void parseAndDumpCatalog(std::string& data);
        void modifyCharacterData(nlohmann::json& js);

        void serverResponseHandler(const std::string& url, std::string& body, std::string& respHeaders);
        void clientRequestHandler(std::string& url, const std::string& body, std::string& reqHeaders);

        std::unordered_set<std::string> _camperItemIds;
        std::unordered_set<std::string> _slasherPowerIds;

        std::unordered_set<std::string> _camperOfferingIds;
        std::unordered_set<std::string> _slasherOfferingIds;

        std::unordered_set<std::string> _camperAddonIds;
        std::unordered_set<std::string> _slasherAddonIds;

        std::unordered_set<std::string> _slasherPerkIds;
        std::unordered_set<std::string> _camperPerkIds;

        std::unordered_set<std::string> _catalogOutfitIds;
        std::unordered_set<std::string> _catalogItemIds;

        std::string _lastBloodWebChar = "Ace";
};
