#pragma once

#include "adapters/windows/input/ToggleHotkey.h"
#include "features/player/IPlayerInput.h"

namespace ta::adapters::windows::input
{
    class PlayerInputAdapter final : public ta::features::player::IPlayerInput
    {
    public:
        [[nodiscard]] bool poll_speed_toggle(int virtual_key) override
        {
            return speed_hotkey_.poll(virtual_key);
        }

        [[nodiscard]] bool poll_fly_toggle(int virtual_key) override
        {
            return fly_hotkey_.poll(virtual_key);
        }

        void reset() noexcept override
        {
            speed_hotkey_.reset();
            fly_hotkey_.reset();
        }

    private:
        ToggleHotkey speed_hotkey_;
        ToggleHotkey fly_hotkey_;
    };
}
