#pragma once

#include "CoreMinimal.h"
#include "Presenter.h"
#include "UObject/SoftObjectPtr.h"
#include "Cinematic.h"
#include "CinematicPresenter.generated.h"

class UUserWidget;
class USubtitlesManager;

UCLASS(Blueprintable, EditInlineNew)
class DBDUIPRESENTERS_API UCinematicPresenter : public UPresenter
{
	GENERATED_BODY()

public:
	UPROPERTY(EditAnywhere, BlueprintReadWrite)
	TSoftClassPtr<UUserWidget> CinematicWidgetClass;

private:
	UPROPERTY(EditInstanceOnly, BlueprintReadWrite, Transient, meta=(AllowPrivateAccess=true))
	FCinematic _currentCinematic;

	UPROPERTY(EditInstanceOnly, BlueprintReadWrite, Transient, meta=(AllowPrivateAccess=true))
	TWeakObjectPtr<USubtitlesManager> _subtitlesManager;

public:
	UFUNCTION(BlueprintCallable)
	void OnWidgetFadeOutAnimationDone();

	UFUNCTION(BlueprintCallable)
	void OnWidgetFadeInAnimationDone();

	UFUNCTION(BlueprintCallable)
	void OnSubtitlesUpdated(const TArray<FString>& subtitles);

	UFUNCTION(BlueprintCallable)
	void OnSkipButtonClicked();

	UFUNCTION(BlueprintCallable)
	void OnPlaybackStarted();

	UFUNCTION(BlueprintCallable)
	void OnPlaybackDone();

	UFUNCTION(BlueprintCallable)
	void MuteGameAudio(const bool shouldMute);

private:
	UFUNCTION(BlueprintCallable, Exec)
	void DBD_StopVideoPlayer();

	UFUNCTION(BlueprintCallable, Exec)
	void DBD_ChangeVideoVolume(float volume);

	UFUNCTION(BlueprintCallable, Exec)
	void DBD_ChangeVideoPlaybackMode(const FString& mode);

public:
	UCinematicPresenter();
};

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