// © 2025 Naked People Team. All Rights Reserved.

#pragma once

#include "CoreMinimal.h"
#include "Engine/DataAsset.h"
#include "Templates/SubclassOf.h"
#include "ItemDefinition.generated.h"

class UItemInstance;

UCLASS(Abstract)
class NAKEDDESIRE_API UItemDefinition : public UPrimaryDataAsset
{
	GENERATED_BODY()

public:
	/** The UItemInstance subclass that runtime instances of this definition use. */
	virtual TSubclassOf<UItemInstance> GetInstanceClass() const PURE_VIRTUAL(UItemDefinition::GetInstanceClass, return nullptr;);

	/** Mint a fresh runtime instance of this definition (new GUID, default per-type state). */
	UItemInstance* CreateInstance(UObject* Outer) const;

	UPROPERTY(EditDefaultsOnly, BlueprintReadOnly)
	FText Name;
	
	UPROPERTY(EditDefaultsOnly, BlueprintReadOnly)
	TObjectPtr<UTexture2D> Icon;
	
	UPROPERTY(EditDefaultsOnly, BlueprintReadOnly)
	UStaticMesh* StaticMesh;
};
