#pragma once

#include "CoreMinimal.h"
#include "AkAudioType.h"
#include "WwiseLocalizedEventCookedData.h"
#include "Engine/LatentActionManager.h"
#include "OnAkPostEventCallback.h"
#include "UObject/NoExportTypes.h"
#include "AkActionOnEventType.h"
#include "EAkCurveInterpolation.h"
#include "AkAudioEvent.generated.h"

class UAkAudioBank;
class UAkGameObject;
class UAkComponent;
class AActor;
class UObject;

UCLASS(Blueprintable)
class AKAUDIO_API UAkAudioEvent : public UAkAudioType
{
	GENERATED_BODY()

public:
	UPROPERTY(EditAnywhere, BlueprintReadWrite, Transient)
	float MaxAttenuationRadius;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Transient)
	bool IsInfinite;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Transient)
	float MinimumDuration;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Transient)
	float MaximumDuration;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Transient)
	FWwiseLocalizedEventCookedData EventCookedData;

	UPROPERTY()
	UAkAudioBank* RequiredBank_DEPRECATED;

public:
	UFUNCTION(BlueprintCallable)
	int32 PostOnGameObjectAndWait(UAkGameObject* GameObject, const FLatentActionInfo LatentActionInfo);

	UFUNCTION(BlueprintCallable, BlueprintCosmetic)
	int32 PostOnGameObject(UAkGameObject* GameObject, const FOnAkPostEventCallback& Delegate, const int32 CallbackMask);

	UFUNCTION(BlueprintCallable)
	int32 PostOnComponentAndWait(UAkComponent* Component, const bool bStopWhenAttachedObjectDestroyed, const FLatentActionInfo LatentActionInfo);

	UFUNCTION(BlueprintCallable, BlueprintCosmetic)
	int32 PostOnComponent(UAkComponent* Component, const FOnAkPostEventCallback& Delegate, const int32 CallbackMask, const bool bStopWhenAttachedObjectDestroyed);

	UFUNCTION(BlueprintCallable)
	int32 PostOnActorAndWait(const AActor* Actor, const bool bStopWhenAttachedObjectDestroyed, const FLatentActionInfo LatentActionInfo);

	UFUNCTION(BlueprintCallable, BlueprintCosmetic)
	int32 PostOnActor(const AActor* Actor, const FOnAkPostEventCallback& Delegate, const int32 CallbackMask, const bool bStopWhenAttachedObjectDestroyed);

	UFUNCTION(BlueprintCallable, BlueprintCosmetic)
	int32 PostAtLocation(const FVector Location, const FRotator Orientation, const FOnAkPostEventCallback& Callback, const int32 CallbackMask, const UObject* WorldContextObject);

	UFUNCTION(BlueprintPure)
	bool IsLoaded() const;

	UFUNCTION(BlueprintCallable, BlueprintCosmetic)
	int32 ExecuteAction(const AkActionOnEventType ActionType, const AActor* Actor, const int32 PlayingID, const int32 TransitionDuration, const EAkCurveInterpolation FadeCurve);

public:
	UAkAudioEvent();
};

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