#include "adapters/config/AimbotConfigAdapter.h"

namespace ta::adapters::config
{
    AimbotConfigAdapter::AimbotConfigAdapter()
        : ta::application::config::ConfigOwner("aimbot", "Aimbot", ta::application::config::ConfigCategory::Aimbot)
    {
    }

    ta::features::aimbot::AimbotSettings AimbotConfigAdapter::read() const
    {
        return {
            magic_bullet_->get_value(),
            aimbot_hotkey_->get_value(),
            show_target_->get_value(),
            target_size_->get_value(),
            ta::foundation::to_rgba(target_color_->get_value())
        };
    }

    void AimbotConfigAdapter::set_magic_bullet(const bool enabled)
    {
        static_cast<void>(magic_bullet_->set_value(enabled));
    }
}
