#pragma once

#include "CoreMinimal.h"
#include "GeneratorDrivenActor.h"
#include "FlickeringLightType.h"
#include "PerPlatformProperties.h"
#include "UObject/NoExportTypes.h"
#include "FlickeringLight.generated.h"

class ULightIntensityTimelineComponent;
class UPointLightComponent;
class URectLightComponent;
class USpotLightComponent;
class ULocalLightComponent;

UCLASS(Blueprintable)
class DEADBYDAYLIGHT_API AFlickeringLight : public AGeneratorDrivenActor
{
	GENERATED_BODY()

private:
	UPROPERTY(EditAnywhere)
	FlickeringLightType _lightComponentType;

	UPROPERTY(EditAnywhere)
	FPerPlatformBool _castShadow;

	UPROPERTY(EditAnywhere)
	FPerPlatformBool _isCastingShadow;

	UPROPERTY(EditAnywhere)
	FPerPlatformFloat _maxDrawDistance;

	UPROPERTY(EditAnywhere)
	FPerPlatformFloat _maxDistanceFadeRange;

	UPROPERTY(EditAnywhere)
	FPerPlatformBool _castCinematicShadowsOnly;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, meta=(AllowPrivateAccess=true))
	float _innerConneAngle;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, meta=(AllowPrivateAccess=true))
	float _outerConneAngle;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, meta=(AllowPrivateAccess=true))
	float _sourceLength;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, meta=(AllowPrivateAccess=true))
	float _sourceRadius;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, meta=(AllowPrivateAccess=true))
	float _intensity;

	UPROPERTY(EditInstanceOnly, BlueprintReadWrite, Transient, meta=(AllowPrivateAccess=true))
	bool _generatorActivated;

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

	UPROPERTY(EditAnywhere, BlueprintReadWrite, meta=(AllowPrivateAccess=true))
	float _maximumTimelimeSpeed;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, meta=(AllowPrivateAccess=true))
	float _minimumTimelimeSpeed;

	UPROPERTY(EditAnywhere)
	FPerPlatformBool _secondaryLightVisibility;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, meta=(AllowPrivateAccess=true))
	float _secondaryLightIntensity;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, meta=(AllowPrivateAccess=true))
	FVector _secondaryLightTransform;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, meta=(AllowPrivateAccess=true))
	FRotator _secondaryLightRotation;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, meta=(AllowPrivateAccess=true))
	float _secondaryLightAttenuationRadius;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, meta=(AllowPrivateAccess=true))
	FLinearColor _secondaryLightColor;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, meta=(AllowPrivateAccess=true))
	float _secondaryLightSpecularScale;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, meta=(AllowPrivateAccess=true))
	uint8 _isAlwaysCapturedAsON : 1;

	UPROPERTY(EditInstanceOnly, BlueprintReadWrite, Transient, Instanced, meta=(AllowPrivateAccess=true))
	ULightIntensityTimelineComponent* _lightIntensityTimeline;

	UPROPERTY(EditInstanceOnly, BlueprintReadWrite, Transient, Instanced, meta=(AllowPrivateAccess=true))
	UPointLightComponent* _pointLightComponent;

	UPROPERTY(EditInstanceOnly, BlueprintReadWrite, Transient, Instanced, meta=(AllowPrivateAccess=true))
	UPointLightComponent* _secondaryPointLightComponent;

	UPROPERTY(EditInstanceOnly, BlueprintReadWrite, Transient, Instanced, meta=(AllowPrivateAccess=true))
	URectLightComponent* _rectLightComponent;

	UPROPERTY(EditInstanceOnly, BlueprintReadWrite, Transient, Instanced, meta=(AllowPrivateAccess=true))
	USpotLightComponent* _spotLightComponent;

protected:
	UFUNCTION(BlueprintCallable, BlueprintCosmetic)
	void StopFlickering();

	UFUNCTION(BlueprintCallable, BlueprintCosmetic)
	void StartFlickering();

	UFUNCTION(BlueprintCallable, BlueprintCosmetic)
	void Init();

public:
	UFUNCTION(BlueprintCallable)
	ULocalLightComponent* GetActiveLightComponent();

public:
	AFlickeringLight();
};

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