#ifndef CONTROLLER_VIEW_HPP_
#define CONTROLLER_VIEW_HPP_

#include <memory>

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

class Player;

/**
 * @brief A widget which wraps a GUI controller widget and disconnects it when destroyed.
 */
class GuiControllerView : public Row
{
private:
    std::shared_ptr<Player> player;
    uint16_t stamp;

public:
    /**
     * @brief Construct a controller view.
     * 
     * @param player The player.
     * @param widget The controller GUI widget.
     * @param stamp The controller's stamp, needed for the `GuiClosed` message.
     */
    GuiControllerView(std::shared_ptr<Player> player, Widget *widget, uint16_t stamp);

    ~GuiControllerView();
};

#endif