#ifndef SCANCODE_PICKER_HPP_
#define SCANCODE_PICKER_HPP_

#include <string>
#include <Widget/Widget.hpp>
#include <Utilities/Extern.hpp>

/**
 * @brief A widget which allows the user to pick the scancode mapped to an action.
 */
class ScancodePicker final : public Widget
{
private:
    static constexpr int width = 64;
    static constexpr int height = 12;

    std::string action;

public:
    /**
     * @brief Construct a label.
     * 
     * @param text The label text.
     */
    ScancodePicker(const std::string &action);

    virtual void draw(GraphicsContext &context) override;
    virtual glm::ivec2 getMinSize() override;
    virtual void onKeyUp(SDL_Keycode keycode) override;
};

#endif