#ifndef ITEM_SLOT_BUTTON_HPP_
#define ITEM_SLOT_BUTTON_HPP_

#include <Widget/StaticItemSlot/StaticItemSlot.hpp>
#include <functional>

/**
 * @brief An item slot which can be clicked to trigger an action.
 */
class ItemSlotButton : public StaticItemSlot
{
public:
    typedef std::function<void()> ClickCallback;

private:
    ClickCallback clickCallback;

public:
    /**
     * @brief Make an item slot button showing the specified stack.
     */
    ItemSlotButton(ItemStack stack, ClickCallback clickCallback);

    virtual void onMouseUp(Uint8 button) override;
};

#endif