#pragma once

#include "CoreMinimal.h"
#include "Skill.h"
#include "GameplayTagContainer.h"
#include "DBDTunableRowHandle.h"
#include "BaseActivatableSkill.generated.h"

class UActivatableSkillSharedData;
class UInteractionAttacherComponent;
class UChargeableComponent;

UCLASS(Blueprintable, Abstract, meta=(BlueprintSpawnableComponent))
class UBaseActivatableSkill : public USkill
{
	GENERATED_BODY()

private:
	UPROPERTY(EditAnywhere, BlueprintReadWrite, meta=(AllowPrivateAccess=true))
	FGameplayTagContainer _activationTags;

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

	UPROPERTY(EditAnywhere, BlueprintReadWrite, meta=(AllowPrivateAccess=true))
	UActivatableSkillSharedData* _sharedData;

	UPROPERTY(BlueprintReadWrite, Transient, Instanced, meta=(AllowPrivateAccess=true))
	UInteractionAttacherComponent* _selfRecoveryAttacher;

	UPROPERTY(BlueprintReadWrite, ReplicatedUsing=OnRep_ChargeableTimer, Transient, Instanced, meta=(AllowPrivateAccess=true))
	UChargeableComponent* _chargeableTimer;

private:
	UFUNCTION(BlueprintCallable)
	void OnRep_ChargeableTimer() const;

	UFUNCTION(BlueprintCallable)
	void Authority_OnIntroCompleted();

public:
	virtual void GetLifetimeReplicatedProps(TArray<FLifetimeProperty>& OutLifetimeProps) const override;

public:
	UBaseActivatableSkill();
};

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