#pragma once

#include <cstdint>

#include "application/config/ConfigOwner.h"
#include "application/config/values/BasicValues.h"
#include "application/config/values/NumberValues.h"
#include "features/world/IWorldSettings.h"

namespace ta::adapters::config
{
    class WorldConfigAdapter final : public ta::application::config::ConfigOwner,
                                       public ta::features::world::IWorldSettings
    {
    public:
        WorldConfigAdapter();
        [[nodiscard]] ta::features::world::WorldSettings read() const override;

    private:
        [[nodiscard]] std::uint32_t normal_category_mask() const noexcept;

        ta::application::config::RegisteredUiAction unlock_doors_{*this, "unlock_doors", "Unlock Doors"};
        ta::application::config::RegisteredConfigValue<ta::application::config::FloatSliderValue> item_teleport_circle_radius_{*this, "item_teleport_circle_radius", 2.5f, 1.f, 10.f, "Item Teleport Circle Radius"};
        ta::application::config::RegisteredConfigValue<ta::application::config::FloatSliderValue> item_teleport_height_offset_{*this, "item_teleport_height_offset", 0.5f, -2.f, 5.f, "Item Teleport Height Offset"};
        ta::application::config::RegisteredConfigValue<ta::application::config::CheckboxValue> include_normal_weapons_{*this, "include_normal_weapons", true, "Weapons"};
        ta::application::config::RegisteredConfigValue<ta::application::config::CheckboxValue> include_normal_ammo_{*this, "include_normal_ammo", true, "Ammunition"};
        ta::application::config::RegisteredConfigValue<ta::application::config::CheckboxValue> include_normal_weapon_mods_{*this, "include_normal_weapon_mods", true, "Weapon Mods"};
        ta::application::config::RegisteredConfigValue<ta::application::config::CheckboxValue> include_normal_equipment_{*this, "include_normal_equipment", true, "Equipment"};
        ta::application::config::RegisteredConfigValue<ta::application::config::CheckboxValue> include_normal_medical_{*this, "include_normal_medical", true, "Medical Items"};
        ta::application::config::RegisteredConfigValue<ta::application::config::CheckboxValue> include_normal_diet_{*this, "include_normal_diet", true, "Diet"};
        ta::application::config::RegisteredConfigValue<ta::application::config::CheckboxValue> include_normal_keys_{*this, "include_normal_keys", true, "Keys"};
        ta::application::config::RegisteredConfigValue<ta::application::config::CheckboxValue> include_normal_containers_{*this, "include_normal_containers", true, "Containers"};
        ta::application::config::RegisteredConfigValue<ta::application::config::CheckboxValue> include_normal_trade_goods_{*this, "include_normal_trade_goods", true, "Trade Goods"};
        ta::application::config::RegisteredConfigValue<ta::application::config::CheckboxValue> include_normal_other_{*this, "include_normal_other", true, "Other Items"};
        ta::application::config::RegisteredUiAction teleport_normal_items_{*this, "teleport_normal_items", "Teleport Normal Items"};
        ta::application::config::RegisteredUiAction teleport_wishlist_items_{*this, "teleport_wishlist_items", "Teleport Wishlist Items"};
        ta::application::config::RegisteredUiAction teleport_quest_items_{*this, "teleport_quest_items", "Teleport Quest Items"};
        ta::application::config::RegisteredUiAction teleport_corpses_{*this, "teleport_corpses", "Teleport Corpses"};
    };
}
