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

#pragma once

#include "CoreMinimal.h"
#include "UObject/Interface.h"
#include "TriggerableInterface.generated.h"

UENUM(BlueprintType)
enum class ETriggerMode : uint8 {
	Server UMETA(DisplayName = "Server Only"),
	Client UMETA(DisplayName = "Triggering Client"),
	Multicast UMETA(DisplayName = "Multicast From Server"),
};

USTRUCT(BlueprintType)
struct FTriggerActionData
{
    GENERATED_BODY()

    UPROPERTY(EditAnywhere, BlueprintReadWrite)
    UObject *TriggeringObject;

	UPROPERTY(EditAnywhere, BlueprintReadWrite)
	TSet<FName> Tags;
};

// This class does not need to be modified.
UINTERFACE(MinimalApi, BlueprintType)
// UCLASS(Blueprintable, BlueprintType)
class UTriggerableInterface : public UInterface
{
	GENERATED_BODY()
};

/**
 * 
 */
class HOWLING_API ITriggerableInterface
{
	GENERATED_BODY()

public:

	UFUNCTION(BlueprintNativeEvent, BlueprintCallable, Category = Trigger)
	void Trigger(FTriggerActionData Action);

	UFUNCTION(BlueprintNativeEvent, BlueprintCallable, Category = Trigger)
	void TriggerRelease(FTriggerActionData Action);

	UFUNCTION(BlueprintNativeEvent, BlueprintCallable, Category = Trigger)
	ETriggerMode GetTriggerMode() const;
};
