#ifndef IENERGY_CONTAINING_ITEM_HPP_
#define IENERGY_CONTAINING_ITEM_HPP_

class ItemStack;

/**
 * @brief Interface implemented by items which store energy.
 */
class IEnergyContainingItem
{
public:
    virtual ~IEnergyContainingItem() = default;

    /**
     * @brief Pull energy from an item stack.
     * 
     * @param stack The item stack (containing this item).
     * @param energy Maximum energy to pull (J).
     * @return The amount of energy actually pulled (J).
     */
    virtual int pullEnergy(ItemStack &stack, int energy) = 0;

    /**
     * @brief Push energy into an item stack.
     * 
     * @param stack The item stack (containing this item).
     * @param energy The amount of energy to push (J).
     * @return The amount of energy actually pushed (J).
     */
    virtual int pushEnergy(ItemStack &stack, int energy) = 0;
};

#endif