#ifndef POPUP_CONTAINER_HPP_
#define POPUP_CONTAINER_HPP_

#include <GraphicsContext/GraphicsContext.hpp>
#include <Widget/Layout/Layout.hpp>

/**
 * @brief A widget which wraps the content of a popup.
 */
class PopupContainer : public Layout
{
private:
    glm::ivec2 popupPos;

public:
    /**
     * @brief Create a popup container with the specified content at the specified position.
     * 
     * @param pos The position of the content.
     * @param content The content widget.
     */
    PopupContainer(glm::ivec2 pos, Widget *content);

    virtual void layout() override;
    virtual glm::ivec2 getMinSize() override;
    virtual void onMouseUp(Uint8 button) override;
    virtual void draw(GraphicsContext &context) override;
};

#endif