#ifndef ITEM_SLOT_HPP_
#define ITEM_SLOT_HPP_

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

class InventoryController;

/**
 * @brief A widget which views and controls an item slot.
 */
class ItemSlot : public StaticItemSlot
{
private:
    InventoryController *ctrl;
    std::string invId;

    std::string getShiftClickDestInv();

protected:
    int m_slot;

    virtual glm::vec4 getHighlight() override;
    virtual void getExtraToolTipLines(ToolTip &tip) override;

public:
    /**
     * @brief Construct the item slot.
     * 
     * @param ctrl The inventory controller.
     * @param invId The bound inventory ID.
     * @param slot The slot number.
     */
    ItemSlot(InventoryController *ctrl, const std::string &invId, int slot);

    virtual void onMouseDown(Uint8 button) override;
};

#endif