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

#pragma once

#include "CoreMinimal.h"
#include "Blueprint/UserWidget.h"
#include "CsdkMsgBoxBase.generated.h"

DECLARE_DYNAMIC_DELEGATE(FOnMsgBoxBtnClicked);


/**
 * 
 */
UCLASS()
class CSDKUI_API UCsdkMsgBoxBase : public UUserWidget
{
	GENERATED_BODY()
public:
	void SetMidBtnInfo(const FString& Content, const FString& MidBtnText,const FOnMsgBoxBtnClicked& MidBtnAction);
	void SetLeftBtnAndRightBtnInfo(const FString& Content, const FString& LeftBtnText,const FOnMsgBoxBtnClicked& LeftBtnAction, const FString& RightBtnText,const FOnMsgBoxBtnClicked& RightBtnAction);
protected:
	UFUNCTION(BlueprintCallable, Category="CSDK|MsgBox")
	void LeftBtnClick();
	UFUNCTION(BlueprintCallable, Category="CSDK|MsgBox")
	void MidBtnClick();
	UFUNCTION(BlueprintCallable, Category="CSDK|MsgBox")
	void RightBtnClick();

	UFUNCTION(BlueprintImplementableEvent)
	void SetMidBtnInfo(const FString& Content, const FString& MidBtnText);
	UFUNCTION(BlueprintImplementableEvent)
	void SetLeftBtnAndRightBtnInfo(const FString& Content, const FString& LeftBtnText, const FString& RightBtnText);

private:
	void UnBindsAll();
	void OnBtnClick(const FOnMsgBoxBtnClicked& OnBtnClicked);
private:
	FOnMsgBoxBtnClicked OnLeftBtnClicked;
	FOnMsgBoxBtnClicked OnMidBtnClicked;
	FOnMsgBoxBtnClicked OnRightBtnClicked;
};
