// Oleg Petruny proprietary.

#pragma once

#include "Blueprint/UserWidget.h"

#include "DialogueRowWidgetManager.generated.h"

enum class EInputAnimatedWidgetAnimation : uint8;

UCLASS(Blueprintable, Abstract)
class UDialogueRowWidgetManager : public UUserWidget
{
    GENERATED_BODY()

public:
    void SetInput(const FKey key, const FText desc, class FDialogueSkipDelegate& delegate);
    void Append(const struct FDialogueRow& dialogue);
    void Remove(const struct FDialogueRow& dialogue);
    void AnimateSkipWidget(const EInputAnimatedWidgetAnimation animation);

protected:
    UPROPERTY(EditDefaultsOnly)
    TSubclassOf<class UDialogueRowWidget> rowWidgetClass;

    UPROPERTY(meta = (BindWidget))
    class UVerticalBox* rows;

    UPROPERTY(BlueprintReadWrite, meta = (BindWidget))
    class UDialogueSkipWidget* dialogueSkipWidget;

    TArray<FString> rowsIds;
    FCriticalSection rowsLock;
    int32 count = 0;
};
