#pragma once

#include "CoreMinimal.h"
#include "ScreenIndicatorsContainerViewInterface.h"
#include "CoreBaseHudWidget.h"
#include "Templates/SubclassOf.h"
#include "CoreScreenIndicatorsContainerWidget.generated.h"

class UCanvasPanel;
class UCoreScreenIndicatorWidget;

UCLASS(Blueprintable, EditInlineNew)
class UCoreScreenIndicatorsContainerWidget : public UCoreBaseHudWidget, public IScreenIndicatorsContainerViewInterface
{
	GENERATED_BODY()

protected:
	UPROPERTY(EditAnywhere, BlueprintReadWrite)
	float InactiveThreshold;

	UPROPERTY(BlueprintReadWrite, meta=(BindWidgetOptional))
	UCanvasPanel* Container;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, NoClear)
	TSubclassOf<UCoreScreenIndicatorWidget> ScreenIndicatorClass;

private:
	UPROPERTY(BlueprintReadWrite, Transient, Instanced, meta=(AllowPrivateAccess=true))
	TMap<FString, UCoreScreenIndicatorWidget*> _screenIndicatorsMap;

	UPROPERTY(BlueprintReadWrite, Transient, Instanced, meta=(AllowPrivateAccess=true))
	TArray<UCoreScreenIndicatorWidget*> _screenIndicatorsPool;

protected:
	UFUNCTION(BlueprintCallable)
	TMap<FString, UCoreScreenIndicatorWidget*> GetScreenIndicatorsMap();

	UFUNCTION(BlueprintPure)
	FString FindScreenIndicatorKey(UCoreScreenIndicatorWidget* value) const;

public:
	UCoreScreenIndicatorsContainerWidget();
};

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