#pragma once

#include "CoreMinimal.h"
#include "Kismet/BlueprintAsyncActionBase.h"
#include "PostEventAsyncOutputPin.h"
#include "OnAkPostEventCallback.h"
#include "PostEventAsync.generated.h"

class UObject;
class UAkAudioEvent;
class AActor;
class UPostEventAsync;

UCLASS(Blueprintable)
class AKAUDIO_API UPostEventAsync : public UBlueprintAsyncActionBase
{
	GENERATED_BODY()

public:
	UPROPERTY(BlueprintReadWrite, BlueprintAssignable)
	FPostEventAsyncOutputPin Completed;

public:
	UFUNCTION(BlueprintCallable, BlueprintCosmetic)
	static UPostEventAsync* PostEventAsync(const UObject* WorldContextObject, UAkAudioEvent* AkEvent, AActor* Actor, int32 CallbackMask, const FOnAkPostEventCallback& PostEventCallback, bool bStopWhenAttachedToDestroyed);

private:
	UFUNCTION(BlueprintCallable)
	void PollPostEventFuture();

public:
	UPostEventAsync();
};

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