// Fill out your copyright notice in the Description page of Project Settings.

#pragma once

#include "CoreMinimal.h"
#include "DialogueWidget.h"
#include "FayeBaseWidget.h"
#include "MainGameWidget.generated.h"

struct FShelvesStackingSetupPayload;

/**
 * 
 */
UCLASS()
class FAYE_API UMainGameWidget : public UFayeBaseWidget
{
	GENERATED_BODY()
	
public:
	
	// Options widget
	UFUNCTION(BlueprintPure)
	UFayeBaseWidget *GetOptionsWidget() const { return Options_Widget; }
	UFUNCTION(BlueprintCallable)
	void ToggleOptionsWidget(bool bActive);
	UFUNCTION(BlueprintPure)
	bool IsOptionsOpen() const { return OptionsOpen; }
	
	// Phone widget
	UFUNCTION(BlueprintPure)
	UFayeBaseWidget *GetPhoneWidget() const { return Phone_Widget; }
	UFUNCTION(BlueprintCallable)
	void TogglePhoneWidget(bool bActive);
	UFUNCTION(BlueprintPure)
	bool IsPhoneOpen() const { return PhoneOpen; }
	
	// Shelve Stacking widget
	UFUNCTION(BlueprintPure)
	UFayeBaseWidget *GetShelvesStackingWidget() const { return Shelves_Stacking_Widget; }
	UFUNCTION(BlueprintCallable)
	void ToggleShelvesStackingWidget(bool bActive, FShelvesStackingSetupPayload Payload);
	UFUNCTION(BlueprintPure)
	bool IsShelvesStackingOpen() const { return ShelvesStackingOpen; }
	
	UFUNCTION(BlueprintPure)
	UDialogueWidget* GetDialogueWidget() const { return Dialogue_Widget; }
	UFUNCTION(BlueprintCallable)
	void ToggleDialogueWidget(bool bActive, FDialogueWidgetPayload DialoguePayload);
	UFUNCTION(BlueprintPure)
	bool IsDialogueOpen() const { return DialogueOpen; }
	
protected:
	
	// Options
	UPROPERTY(meta = (BindWidget))
	UFayeBaseWidget* Options_Widget;
	UPROPERTY()
	bool OptionsOpen = false;
	
	// Phone
	UPROPERTY(meta = (BindWidget))
	UFayeBaseWidget* Phone_Widget;
	UPROPERTY()
	bool PhoneOpen = false;
	
	// Shelve Stacking UI
	UPROPERTY(meta = (BindWidget))
	UFayeBaseWidget* Shelves_Stacking_Widget;
	UPROPERTY()
	bool ShelvesStackingOpen = false;
	
	UPROPERTY(meta = (BindWidget))
	UDialogueWidget* Dialogue_Widget;
	UPROPERTY()
	bool DialogueOpen = false;
};
