#pragma once

#include "application/config/ConfigOwner.h"
#include "application/config/values/BasicValues.h"
#include "application/config/values/ColorValues.h"
#include "application/config/values/TextValues.h"
#include "features/chams/IChamsSettings.h"

namespace ta::adapters::config
{
    class ChamsConfigAdapter final : public ta::application::config::ConfigOwner,
                                       public ta::features::chams::IChamsSettings
    {
    public:
        ChamsConfigAdapter();
        [[nodiscard]] ta::features::chams::ChamsSettings read() const override;

    private:
        ta::application::config::RegisteredConfigValue<ta::application::config::CheckboxValue> npc_chams_{*this, "npc_chams", false, "NPC Chams"};
        ta::application::config::RegisteredConfigValue<ta::application::config::CheckboxValue> gear_chams_{*this, "gear_chams", false, "Gear Chams"};
        ta::application::config::RegisteredConfigValue<ta::application::config::SelectValue> chams_type_{*this, "chams_type", 0,
            std::initializer_list<const char*>{"Solid", "Wireframe", "Forcefield", "Glass", "Lava", "Outline"}, "Type"};
        ta::application::config::RegisteredConfigValue<ta::application::config::ColorpickerValue> visible_color_{*this, "visible_color", ta::application::config::ConfigColor{1.0f, 112.0f / 255.0f, 72.0f / 255.0f, 1.0f}, "Visible Color"};
        ta::application::config::RegisteredConfigValue<ta::application::config::ColorpickerValue> invisible_color_{*this, "invisible_color", ta::application::config::ConfigColor{139.0f / 255.0f, 99.0f / 255.0f, 1.0f, 1.0f}, "Invisible Color"};
        ta::application::config::RegisteredConfigValue<ta::application::config::CheckboxValue> weapon_chams_{*this, "weapon_chams", false, "Weapon Chams"};
        ta::application::config::RegisteredConfigValue<ta::application::config::SelectValue> weapon_type_{*this, "weapon_type", 5,
            std::initializer_list<const char*>{"Solid", "Wireframe", "Forcefield", "Glass", "Lava", "Outline"}, "Type"};
        ta::application::config::RegisteredConfigValue<ta::application::config::ColorpickerValue> weapon_color_{*this, "weapon_color", ta::application::config::ConfigColor{116.0f / 255.0f, 199.0f / 255.0f, 236.0f / 255.0f, 1.0f}, "Color"};
        ta::application::config::RegisteredConfigValue<ta::application::config::CheckboxValue> include_scope_{*this, "include_scope", false, "Include Scope"};
        ta::application::config::RegisteredConfigValue<ta::application::config::CheckboxValue> player_chams_{*this, "player_chams", false, "Player"};
    };
}
