#pragma once

#include "CoreMinimal.h"
#include "UObject/NoExportTypes.h"
#include "EHoudiniInputType.h"
#include "HoudiniInputObjectSettings.h"
#include "HoudiniInput.generated.h"

class UHoudiniInputObject;
class AActor;
class ULandscapeComponent;
class UHoudiniInputHoudiniSplineComponent;

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

protected:
	UPROPERTY(EditAnywhere, BlueprintReadWrite)
	FString Name;

	UPROPERTY(EditAnywhere, BlueprintReadWrite)
	FString Label;

	UPROPERTY(EditAnywhere, BlueprintReadWrite)
	EHoudiniInputType Type;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Transient, DuplicateTransient)
	EHoudiniInputType PreviousType;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Transient, DuplicateTransient)
	int32 AssetNodeId;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, NonTransactional, Transient, DuplicateTransient)
	int32 InputNodeId;

	UPROPERTY(EditAnywhere, BlueprintReadWrite)
	int32 InputIndex;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, NonTransactional, Transient, DuplicateTransient)
	int32 ParmId;

	UPROPERTY(EditAnywhere, BlueprintReadWrite)
	bool bIsObjectPathParameter;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, NonTransactional, Transient, DuplicateTransient)
	TArray<int32> CreatedDataNodeIds;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Transient, DuplicateTransient)
	bool bHasChanged;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Transient, DuplicateTransient)
	bool bNeedsToTriggerUpdate;

	UPROPERTY(EditAnywhere, BlueprintReadWrite)
	FBox CachedBounds;

	UPROPERTY(EditAnywhere, BlueprintReadWrite)
	FString Help;

	UPROPERTY(EditAnywhere, BlueprintReadWrite)
	bool bPackBeforeMerge;

	UPROPERTY(EditAnywhere, BlueprintReadWrite)
	bool bDirectlyConnectHdas;

	UPROPERTY(EditAnywhere, BlueprintReadWrite)
	bool bExportOptionsMenuExpanded;

	UPROPERTY(EditAnywhere, BlueprintReadWrite)
	bool bGeometryInputsMenuExpanded;

	UPROPERTY(EditAnywhere, BlueprintReadWrite)
	bool bLandscapeOptionsMenuExpanded;

	UPROPERTY(EditAnywhere, BlueprintReadWrite)
	bool bWorldInputsMenuExpanded;

	UPROPERTY(EditAnywhere, BlueprintReadWrite)
	bool bCurveInputsMenuExpanded;

	UPROPERTY(EditAnywhere, BlueprintReadWrite)
	bool bCurvePointSelectionMenuExpanded;

	UPROPERTY(EditAnywhere, BlueprintReadWrite)
	bool bCurvePointSelectionUseAbsLocation;

	UPROPERTY(EditAnywhere, BlueprintReadWrite)
	bool bCurvePointSelectionUseAbsRotation;

	UPROPERTY(EditAnywhere, BlueprintReadWrite)
	bool bCookOnCurveChanged;

	UPROPERTY(EditAnywhere, BlueprintReadWrite)
	TArray<UHoudiniInputObject*> GeometryInputObjects;

	UPROPERTY(EditAnywhere, BlueprintReadWrite)
	bool bStaticMeshChanged;

	UPROPERTY(EditAnywhere, BlueprintReadWrite)
	bool bInputAssetConnectedInHoudini;

	UPROPERTY(EditAnywhere, BlueprintReadWrite)
	TArray<UHoudiniInputObject*> CurveInputObjects;

	UPROPERTY(EditAnywhere, BlueprintReadWrite)
	float DefaultCurveOffset;

	UPROPERTY(EditAnywhere, BlueprintReadWrite)
	bool bLandscapeHasExportTypeChanged;

	UPROPERTY(EditAnywhere, BlueprintReadWrite)
	TArray<UHoudiniInputObject*> WorldInputObjects;

	UPROPERTY(EditAnywhere, BlueprintReadWrite)
	TArray<AActor*> WorldInputBoundSelectorObjects;

	UPROPERTY(EditAnywhere, BlueprintReadWrite)
	bool bIsWorldInputBoundSelector;

	UPROPERTY(EditAnywhere, BlueprintReadWrite)
	bool bWorldInputBoundSelectorAutoUpdate;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Export)
	TSet<ULandscapeComponent*> LandscapeSelectedComponents;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, NonTransactional, Transient, DuplicateTransient)
	TSet<int32> InputNodesPendingDelete;

public:
	UPROPERTY(EditAnywhere, BlueprintReadWrite, Transient, DuplicateTransient)
	TArray<UHoudiniInputHoudiniSplineComponent*> LastInsertedInputs;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, NonTransactional, Transient, DuplicateTransient)
	TArray<UHoudiniInputObject*> LastUndoDeletedInputs;

	UPROPERTY(EditAnywhere, BlueprintReadWrite)
	bool bLandscapeControlVisiblity;

	UPROPERTY(EditAnywhere, BlueprintReadWrite)
	bool bCanDeleteHoudiniNodes;

protected:
	UPROPERTY(EditAnywhere, BlueprintReadWrite)
	bool bLandscapeSplinesExportOptionsMenuExpanded;

	UPROPERTY(EditAnywhere, BlueprintReadWrite)
	FHoudiniInputObjectSettings InputSettings;

public:
	UHoudiniInput();
};

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