#ifndef ICON_LABEL_HPP_
#define ICON_LABEL_HPP_

#include <Widget/Widget.hpp>
#include <Material/Material.hpp>

/**
 * @brief A widget which displays an icon.
 */
class IconLabel : public Widget
{
private:
    Material &icon;
    glm::vec4 color = glm::vec4(1.0f);

public:
    /**
     * @brief Construct a IconLabel.
     * 
     * @param icon The icon to display.
     */
    IconLabel(Material &icon);

    /**
     * @brief Sets the icon color to `color` and returns `this`.
     */
    IconLabel* withColor(glm::vec4 color);

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

#endif