#pragma once

#include "ItemType.h"
#include "Reader.h"

class ItemType;

class Item : public virtual Framework::ReferenceCounter
{
protected:
    const ItemType *zType;
    float damage;
    float maxDamage;
    float durability;
    float maxDurability;
    bool eatable;
    bool placeable;
    bool equippable;
    bool solid;
    bool usable;
    int maxStackSize;
    Framework::Text name;
    Item( const ItemType *zType, const char *name );

public:

    const ItemType *zItemType() const;
    float getDamage() const;
    float getDurability() const;
    bool isUsable() const;
    bool isEatable() const;
    bool isPlaceable() const;
    bool isEquippable() const;
    bool isSolid() const;
    float getMaxDurability() const;
    int getMaxStackSize() const;
    float getMaxDamage() const;

    friend ItemType;
};