#pragma once

#include "CoreMinimal.h"
#include "UObject/NoExportTypes.h"
#include "HImageData.h"
#include "EHoudiniToolType.h"
#include "EHoudiniToolSelectionType.h"
#include "HoudiniToolData.generated.h"

UCLASS(Blueprintable)
class HOUDINIENGINERUNTIME_API UHoudiniToolData : public UObject
{
	GENERATED_BODY()

public:
	UPROPERTY(EditAnywhere, BlueprintReadWrite)
	FString Name;

	UPROPERTY(EditAnywhere, BlueprintReadWrite)
	FString ToolTip;

	UPROPERTY(EditAnywhere, BlueprintReadWrite)
	FHImageData IconImageData;

	UPROPERTY(EditAnywhere, BlueprintReadWrite)
	FFilePath IconSourcePath;

	UPROPERTY(EditAnywhere, BlueprintReadWrite)
	FString HelpURL;

	UPROPERTY(EditAnywhere, BlueprintReadWrite)
	EHoudiniToolType Type;

	UPROPERTY(EditAnywhere, BlueprintReadWrite)
	bool DefaultTool;

	UPROPERTY(EditAnywhere, BlueprintReadWrite)
	EHoudiniToolSelectionType SelectionType;

	UPROPERTY(EditAnywhere, BlueprintReadWrite)
	FFilePath SourceAssetPath;

public:
	UFUNCTION(BlueprintCallable)
	bool SaveToJSONFile(const FString& JsonFilePath);

	UFUNCTION(BlueprintCallable)
	bool PopulateFromJSONFile(const FString& JsonFilePath);

	UFUNCTION(BlueprintCallable)
	bool PopulateFromJSONData(const FString& JSONData);

	UFUNCTION(BlueprintPure)
	bool ConvertToJSONData(FString& JSONData) const;

public:
	UHoudiniToolData();
};

FORCEINLINE uint32 GetTypeHash(const UHoudiniToolData) { return 0; }
