#pragma once

#include "CoreMinimal.h"
#include "Collectable.h"
#include "Templates/SubclassOf.h"
#include "DBDTunableRowHandle.h"
#include "HarpoonRifle.generated.h"

class UChainLinkableComponent;
class ARifleChain;
class UHarpoonLauncher;
class UHarpoonProviderComponent;
class URifleChainTensionComponent;
class UChargeableComponent;
class URiflePlayerLinker;
class UHarpoonChainPositioner;
class UFireHarpoonRifleInteraction;
class UTriggerableActivatorComponent;

UCLASS(Blueprintable)
class THEGUNSLINGER_API AHarpoonRifle : public ACollectable
{
	GENERATED_BODY()

private:
	UPROPERTY(EditAnywhere, BlueprintReadWrite, meta=(AllowPrivateAccess=true))
	TSubclassOf<UChainLinkableComponent> _survivorLinkableClass;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, meta=(AllowPrivateAccess=true))
	TSubclassOf<UChainLinkableComponent> _killerLinkableClass;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, meta=(AllowPrivateAccess=true))
	TSubclassOf<ARifleChain> _chainClass;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, meta=(AllowPrivateAccess=true))
	FName _rifleMuzzleSocket;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, meta=(AllowPrivateAccess=true))
	FName _rifleHarpoonLoadingSocket;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, meta=(AllowPrivateAccess=true))
	FDBDTunableRowHandle _crowActiveRange;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Instanced, meta=(AllowPrivateAccess=true))
	UHarpoonLauncher* _launcher;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Instanced, meta=(AllowPrivateAccess=true))
	UHarpoonProviderComponent* _harpoonProvider;

	UPROPERTY(BlueprintReadWrite, Transient, meta=(AllowPrivateAccess=true))
	ARifleChain* _chain;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Instanced, meta=(AllowPrivateAccess=true))
	URifleChainTensionComponent* _chainTensionComponent;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Instanced, meta=(AllowPrivateAccess=true))
	UChargeableComponent* _chainTensionChargeable;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Instanced, meta=(AllowPrivateAccess=true))
	URiflePlayerLinker* _playerLinker;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Instanced, meta=(AllowPrivateAccess=true))
	UHarpoonChainPositioner* _harpoonChainPositioner;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Instanced, meta=(AllowPrivateAccess=true))
	UFireHarpoonRifleInteraction* _fireInteraction;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Instanced, meta=(AllowPrivateAccess=true))
	UTriggerableActivatorComponent* _crowsActivatorComponent;

public:
	UFUNCTION(BlueprintPure)
	ARifleChain* GetChain() const;

private:
	UFUNCTION(BlueprintCallable)
	void Authority_OnFireHarpoon();

public:
	AHarpoonRifle();
};

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