#pragma once

#include "CoreMinimal.h"
#include "Firecracker.h"
#include "GameplayTagContainer.h"
#include "Templates/SubclassOf.h"
#include "EOfferingEffectType.h"
#include "Engine/CollisionProfile.h"
#include "Engine/HitResult.h"
#include "FogVial.generated.h"

class UItemModifier;
class UFogVialCosmeticHelperManager;
class UFloatValueStrategy;
class UStatusEffect;
class USphereComponent;
class UPrimitiveComponent;
class AActor;

UCLASS(Blueprintable)
class DBDSURVIVORCOLLECTABLES_API AFogVial : public AFirecracker
{
	GENERATED_BODY()

protected:
	UPROPERTY(EditAnywhere, BlueprintReadWrite, Instanced)
	UItemModifier* _itemModifier;

	UPROPERTY(EditAnywhere, BlueprintReadWrite)
	float _fogCloudAreaRadius;

	UPROPERTY(EditAnywhere, BlueprintReadWrite)
	float _extraTrackingDistanceBuffer;

	UPROPERTY(EditAnywhere, BlueprintReadWrite)
	float _secondsToExpand;

	UPROPERTY(EditAnywhere, BlueprintReadWrite)
	float _secondsAtMaxSize;

	UPROPERTY(EditAnywhere, BlueprintReadWrite)
	float _secondsToDisappear;

	UPROPERTY(EditAnywhere, BlueprintReadWrite)
	float _fogOpacity;

	UPROPERTY(EditAnywhere, BlueprintReadWrite)
	float _audioInFog;

	UPROPERTY(EditAnywhere)
	FGameplayTag _useFogVialScoreEvent;

	UPROPERTY(EditAnywhere, BlueprintReadWrite)
	TSubclassOf<UFogVialCosmeticHelperManager> _fogVialCosmeticManagerClass;

	UPROPERTY(EditAnywhere, BlueprintReadWrite)
	EOfferingEffectType _offeringDoublingScore;

private:
	UPROPERTY(EditAnywhere, BlueprintReadWrite, Instanced, meta=(AllowPrivateAccess=true))
	UFloatValueStrategy* _scratchMarkPreventionAreaMinRadius;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Instanced, meta=(AllowPrivateAccess=true))
	UFloatValueStrategy* _scratchMarkPreventionAreaMaxRadius;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, meta=(AllowPrivateAccess=true))
	TSubclassOf<UStatusEffect> _survivorAuraAndScratchMarkPreventionStatusEffect;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, meta=(AllowPrivateAccess=true))
	TSubclassOf<UStatusEffect> _survivorMuteFootStepStatusEffect;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, meta=(AllowPrivateAccess=true))
	TSubclassOf<UStatusEffect> _killerAuraPreventionStatusEffect;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, meta=(AllowPrivateAccess=true))
	FCollisionProfileName _playerDetectorCollisionProfileName;

	UPROPERTY(EditInstanceOnly, BlueprintReadWrite, Transient, Instanced, meta=(AllowPrivateAccess=true))
	UFogVialCosmeticHelperManager* _fogVialCosmeticManager;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, meta=(AllowPrivateAccess=true))
	bool _canOverlapOtherFogVials;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, meta=(AllowPrivateAccess=true))
	bool _shouldFogVialMuteFootsteps;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Instanced, meta=(AllowPrivateAccess=true))
	USphereComponent* _otherFogVialCollider;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, meta=(AllowPrivateAccess=true))
	FGameplayTagContainer _stateTagsWhileInRange;

private:
	UFUNCTION()
	void OnOtherFogVialOverlapBegin(UPrimitiveComponent* hitComp, AActor* otherActor, UPrimitiveComponent* otherComponent, int32 otherBodyIndex, bool bFromSweep, const FHitResult& sweepResult);

protected:
	UFUNCTION(BlueprintCallable, BlueprintImplementableEvent)
	void OnFogAreaStartedToShrink();

	UFUNCTION(BlueprintCallable, BlueprintImplementableEvent)
	void DissipateFogVialVisuals();

public:
	AFogVial();
};

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