#pragma once

#include <cstdint>

#include "application/config/ConfigOwner.h"
#include "application/config/values/BasicValues.h"
#include "application/config/values/NumberValues.h"
#include "application/config/values/TextValues.h"
#include "features/items/dependencies/IItemSettings.h"

namespace ta::adapters::config
{
    class ItemConfigAdapter final : public ta::application::config::ConfigOwner,
                                      public ta::features::items::dependencies::IItemSettings
    {
    public:
        ItemConfigAdapter();
        [[nodiscard]] ta::features::items::contracts::ItemSettings read() const override;

    private:
        ta::application::config::RegisteredConfigValue<ta::application::config::TextboxValue> item_id_{*this, "item_id", "", "Item Id"};
        ta::application::config::RegisteredUiAction open_item_selector_{*this, "open_item_selector", "Open Item Selector"};
        ta::application::config::RegisteredConfigValue<ta::application::config::SelectValue> item_slot_{*this, "item_slot", 4, std::initializer_list<const char*>{
            "Primary Weapon", "Secondary Weapon", "Holster", "Melee", "Backpack", "Secure Container", "Rig", "Armor",
            "Pockets", "Eyewear", "FaceCover", "Headwear", "Earpiece", "Dog-tag", "Armband", "Quest Item Inventory"}, "Item Slot"};
        ta::application::config::RegisteredConfigValue<ta::application::config::CheckboxValue> override_max_amount_{*this, "override_max_amount", false, "Override Max Amount"};
        ta::application::config::RegisteredConfigValue<ta::application::config::IntTextboxValue> amount_{*this, "amount", 1, "Item Amount"};
        ta::application::config::RegisteredConfigValue<ta::application::config::CheckboxValue> fir_{*this, "fir", true, "Found in Raid"};
        ta::application::config::RegisteredConfigValue<ta::application::config::CheckboxValue> overwrite_slot_{*this, "overwrite_slot", false, "Overwrite Slot"};
        ta::application::config::RegisteredUiAction create_item_{*this, "create_item", "Create Item"};
        ta::application::config::RegisteredUiAction transit_item_{*this, "transit_item", "Transit Item (2-3h)"};
        ta::application::config::RegisteredConfigValue<ta::application::config::CheckboxValue> no_slot_limits_{*this, "no_slot_limits", false, "No Slot Limits"};
        ta::application::config::RegisteredConfigValue<ta::application::config::CheckboxValue> increased_transfer_size_{*this, "increased_transfer_size", false, "Increased Transfer Size"};
    };
}
