#pragma once

#include "CoreMinimal.h"
#include "DBDChildActorInterface.h"
#include "GameFramework/Actor.h"
#include "K39TentacleSkin.h"
#include "GameplayTagContainer.h"
#include "UObject/ScriptInterface.h"
#include "K39TentaclesActor.generated.h"

class UDBDSkeletalMeshComponentBudgeted;
class UDBDOutlineComponent;
class UAnimationMontageSlave;
class UMontagePlayer;
class USceneComponent;
class IObjectStateProvider;

UCLASS(Blueprintable)
class THEK39_API AK39TentaclesActor : public AActor, public IDBDChildActorInterface
{
	GENERATED_BODY()

protected:
	UPROPERTY(EditAnywhere, BlueprintReadWrite, Instanced)
	UDBDSkeletalMeshComponentBudgeted* _skeletalMeshComponent;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Instanced)
	UDBDSkeletalMeshComponentBudgeted* _longTentaclesMeshComponent;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Instanced)
	UDBDOutlineComponent* _outlineComponentShortTentacles;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Instanced)
	UDBDOutlineComponent* _outlineComponentLongTentacles;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Instanced)
	UAnimationMontageSlave* _montageFollower;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Instanced)
	UMontagePlayer* _montagePlayer;

	UPROPERTY(EditAnywhere, BlueprintReadWrite)
	FK39TentacleSkin _defaultSkin;

	UPROPERTY(EditAnywhere, BlueprintReadWrite)
	TMap<FName, FK39TentacleSkin> _skinOverrides;

	UPROPERTY(EditAnywhere)
	FGameplayTagQuery _shouldShowLongTentaclesTagQuery;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Instanced)
	USceneComponent* _rootComponent;

private:
	UPROPERTY(BlueprintReadWrite, Transient, meta=(AllowPrivateAccess=true))
	TScriptInterface<IObjectStateProvider> _stateProvider;

public:
	UFUNCTION(BlueprintCallable)
	void SetLongTentaclesVisibility(bool isVisible);

protected:
	UFUNCTION(BlueprintCallable)
	void HandleOwningPlayerCustomizationsChanged();

public:
	UFUNCTION(BlueprintPure)
	UDBDSkeletalMeshComponentBudgeted* GetMesh() const;

	UFUNCTION(BlueprintPure)
	UDBDSkeletalMeshComponentBudgeted* GetLongTentaclesMesh() const;

public:
	AK39TentaclesActor();
};

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