#pragma once

#include "CoreMinimal.h"
#include "Components/SceneComponent.h"
#include "AkAcousticPortalState.h"
#include "Engine/EngineTypes.h"
#include "AkPortalComponent.generated.h"

class UPrimitiveComponent;

UCLASS(Blueprintable, meta=(BlueprintSpawnableComponent))
class AKAUDIO_API UAkPortalComponent : public USceneComponent
{
	GENERATED_BODY()

public:
	UPROPERTY(EditAnywhere, BlueprintReadWrite)
	bool bDynamic;

	UPROPERTY(EditAnywhere, BlueprintReadWrite)
	AkAcousticPortalState InitialState;

	UPROPERTY(EditAnywhere, BlueprintReadWrite)
	float InitialOcclusion;

	UPROPERTY(EditAnywhere, BlueprintReadWrite)
	float ObstructionRefreshInterval;

	UPROPERTY(EditAnywhere, BlueprintReadWrite)
	TEnumAsByte<ECollisionChannel> ObstructionCollisionChannel;

public:
	UFUNCTION(BlueprintCallable)
	void SetPortalOcclusion(float InPortalOcclusion);

	UFUNCTION(BlueprintCallable)
	void SetDynamic(bool bInDynamic);

	UFUNCTION(BlueprintPure)
	bool PortalPlacementValid() const;

	UFUNCTION(BlueprintPure)
	UPrimitiveComponent* GetPrimitiveParent() const;

	UFUNCTION(BlueprintPure)
	float GetPortalOcclusion() const;

	UFUNCTION(BlueprintPure)
	AkAcousticPortalState GetCurrentState() const;

	UFUNCTION(BlueprintCallable)
	void EnablePortal();

	UFUNCTION(BlueprintCallable)
	void DisablePortal();

public:
	UAkPortalComponent();
};

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