// Fill out your copyright notice in the Description page of Project Settings.

#pragma once

#include "CoreMinimal.h"
#include "UObject/Interface.h"
#include "InteractionSettings.h"
#include "InteractableActorInterface.generated.h"

UINTERFACE(MinimalAPI)
class UInteractableActorInterface : public UInterface
{
	GENERATED_BODY()
};

/**
 * 
 */
class INTERACTIONSYSTEM_API IInteractableActorInterface
{
	GENERATED_BODY()

public:
	
	UFUNCTION(BlueprintNativeEvent, BlueprintCallable, Category = "Interactable")
	FText GetInteractionText() const;
	virtual FText GetInteractionText_Implementation() const { return FText::GetEmpty(); }
	
	UFUNCTION(BlueprintNativeEvent, BlueprintCallable, Category = "Interactable")
	bool IsInteractable() const;
	virtual bool IsInteractable_Implementation() const { return false; }
	
	UFUNCTION(BlueprintNativeEvent, BlueprintCallable, Category = "Interactable")
	void Interact(AActor* InteractionInstigator);
	virtual void Interact_Implementation(AActor* InteractionInstigator) {}
	
	UFUNCTION(BlueprintNativeEvent, BlueprintCallable, Category = "Interactable")
	void ToggleInteractableUI(bool bActive);
	virtual void ToggleInteractableUI_Implementation(bool bActive) {}
	
	UFUNCTION(BlueprintNativeEvent, BlueprintCallable, Category = "Interactable")
	float GetInteractionDistance() const;
	virtual float GetInteractionDistance_Implementation() const
	{
		return GetDefault<UInteractionSettings>()->InteractableMaxDistance;
	}
};
