#pragma once

#include "CoreMinimal.h"
#include "Engine/DataTable.h"
#include "Items/ItemTypes.h"
#include "ItemRow.generated.h"

class AActor;
class UStaticMesh;
class UTexture2D;

USTRUCT(BlueprintType)
struct ZMMO_API FItemRow : public FTableRowBase
{
	GENERATED_BODY()

	UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Item")
	FText DisplayName;

	UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Item", meta = (MultiLine = true))
	FText Description;

	UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Item")
	EItemType Type = EItemType::None;

	UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Item")
	EItemRarity Rarity = EItemRarity::Common;

	UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Equipment", meta = (EditCondition = "Type == EItemType::Weapon || Type == EItemType::Armor || Type == EItemType::Accessory"))
	EEquipSlot EquipSlot = EEquipSlot::None;

	UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Item")
	int32 MaxStack = 1;

	UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Item")
	int32 BasePrice = 0;

	UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Visuals")
	TSoftObjectPtr<UTexture2D> Icon;

	UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Visuals")
	TSoftObjectPtr<UStaticMesh> WorldMesh;

	UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Behavior")
	TSoftClassPtr<AActor> BehaviorClass;
};
