#pragma once

#include "CoreMinimal.h"
#include "GeneratorTrapPerk.h"
#include "Templates/SubclassOf.h"
#include "TacticianWireTap.generated.h"

class UFloatValueStrategy;
class UTacticianWireTapRevealEffect;
class AGenerator;

UCLASS(Blueprintable, meta=(BlueprintSpawnableComponent))
class CALAMARI_API UTacticianWireTap : public UGeneratorTrapPerk
{
	GENERATED_BODY()

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

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

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

	UPROPERTY(EditAnywhere, BlueprintReadWrite, meta=(AllowPrivateAccess=true))
	TSubclassOf<UTacticianWireTapRevealEffect> _revealEffect;

	UPROPERTY(EditInstanceOnly, BlueprintReadWrite, Transient, Instanced, meta=(AllowPrivateAccess=true))
	TArray<UTacticianWireTapRevealEffect*> _revealStatusEffects;

public:
	UFUNCTION(BlueprintPure)
	float GetGeneratorRevealRange() const;

private:
	UFUNCTION(BlueprintCallable)
	void Authority_OnRepairProgressApplied(float addedChargePercent, float progressPercent, bool isTrapReady, AGenerator* generator);

public:
	UTacticianWireTap();
};

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