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

#pragma once

#include "CoreMinimal.h"
#include "ConfigItemWidget.h"

/**
 * 
 */
class AIGC_API SAIGCWindow: public SCompoundWidget
{
public:
	SLATE_BEGIN_ARGS(SAIGCWindow)
	{}
	SLATE_END_ARGS()

	
	EActiveTimerReturnType OnPostPaint(double X, float Arg);
	void Construct(const FArguments& InArgs);
	void OnAIGenerateClicked();
	
	void InitWebClient();
	void HandleReceiveData(TArray<FString>  String);
	
private:
	FString GeneratePromptJson();

protected:
	TSharedPtr<SConfigItemWidget> ServerIP; //服务器IP
	TSharedPtr<SConfigItemWidget> DataName; //datatable 名称
	TSharedPtr<SConfigItemWidget> NPCName1; //npc1的名称
	TSharedPtr<SConfigItemWidget> NPCJob1;	//npc1的职业
	TSharedPtr<SConfigItemWidget> NPCName2; //npc2的名称
	TSharedPtr<SConfigItemWidget> NPCJob2;	//npc2的职业
	TSharedPtr<SConfigItemWidget> DialogScene; //对话场景
	TSharedPtr<SButton> GenerateButton; //生成按钮

	UPROPERTY()
	class UWebSocketManager* WebSocketManager;
};