#ifndef EDITSCENE_ITEM_HPP
#define EDITSCENE_ITEM_HPP
#pragma once

#include <Ogre.h>
#include <string>
#include <vector>

/**
 * Item definition component.
 *
 * Attached to a world entity that represents a pickable item.
 * The ActuatorSystem detects items (entities with ItemComponent)
 * and shows "E - Pick up [ItemName]" prompts to the player.
 *
 * Items can also be placed in containers (chests, etc.) which
 * have an InventoryComponent.
 *
 * For AI characters, behavior tree nodes (hasItem, pickupItem,
 * dropItem, useItem, addItemToInventory) provide inventory access.
 */
struct ItemComponent {
	// Display name of the item (e.g. "Apple", "Sword", "Key")
	Ogre::String itemName = "Item";

	// Item type for categorization (e.g. "food", "weapon", "key", "quest")
	Ogre::String itemType = "misc";

	// Unique identifier for this item definition
	// Multiple entities can share the same itemId (e.g. multiple coins)
	Ogre::String itemId;

	// Stack size: how many of this item are in this stack
	int stackSize = 1;

	// Maximum stack size (0 = no stacking)
	int maxStackSize = 99;

	// Weight per unit (for encumbrance calculations)
	float weight = 0.1f;

	// Value (for trading)
	int value = 1;

	// Name of the GOAP action to execute when "using" this item
	// (e.g. "eat", "equip", "read"). Empty = no use action.
	Ogre::String useActionName;

	ItemComponent() = default;

	explicit ItemComponent(const Ogre::String &name,
			       const Ogre::String &type = "misc")
		: itemName(name)
		, itemType(type)
	{
	}
};

#endif // EDITSCENE_ITEM_HPP
