{
	"name": "form/nc/nc-admin/nc-admin.json",
	"layout": {
		"component": "nc-form",
		"attribute": {
			"id": "nc_admin"
		},
		"element": [
			{
				"component": "nc-row",
				"element": [
					{
						"component": "nc-tab",
						"attribute": {
							"model": "rec.tab",
							"v-on:change": "tabChanged('tab')"
						}
					}
				]
			},
			{
				"component": "nc-row",
				"attribute": {
					"class": ["nc-margin-top", "nc-align-top"]
				},
				"element": [
					{
						"component": "nc-col",
						"element": [
							{
								"component": "nc-col",
								"attribute": {
									"width": "1/5",
									"style": "min-width: 20em;"
								},
								"element": [
									{
										"component": "nc-row",
										"element": [
											{
												"component": "nc-col",
												"attribute": {
													"width": "auto"
												},
												"element": [
													{
														"component": "nc-label",
														"text": "Topic"
													}
												]
											},
											{
												"component": "nc-col",
												"attribute": {},
												"element": [
													{
														"component": "nc-button",
														"attribute": {
															"icon": "minus",
															"color": "success",
															"v-on:click": "addChatTopic()",
															"model": "rec.button_add",
															"class": ["basic", "small", "circular"],
															"style": "width: 34px !important; min-width: 34px !important; padding-left: 12px;"
														}
													},
													{
														"component": "nc-button",
														"attribute": {
															"icon": "plus",
															"color": "red",
															"v-on:click": "deleteChatTopic()",
															"model": "rec.button_delete",
															"class": ["basic", "small", "circular"],
															"style": "width: 34px !important; min-width: 34px !important; padding-left: 12px;"
														}
													}
												]
											}
										]
									},
									{
										"component": "nc-row",
										"element": [
											{
												"component": "nc-grid",
												"attribute": {
													"id": "chat_topic",
													"height": "calc(100vh - 12em)",
													"model": "grid.chat_topic"
												}
											}
										]
									}
								]
							}
						]
					},
					{
						"component": "nc-col",
						"attribute": {
							"width": "1em"
						},
						"element": [
							{
								"component": "nc-line-v",
								"attribute": {
									"height": "calc(100vh - 10em)"
								}
							}
						]
					},
					{
						"component": "nc-col",
						"element": [
							{
								"component": "nc-col",
								"attribute": {
									"width": "1/5",
									"style": "min-width: 20em;"
								},
								"element": [
									{
										"component": "nc-row",
										"element": [
											{
												"component": "nc-col",
												"attribute": {
													"width": "auto"
												},
												"element": [
													{
														"component": "nc-label",
														"text": "History"
													}
												]
											},
											{
												"component": "nc-col",
												"attribute": {},
												"element": [
													{
														"component": "nc-button",
														"attribute": {
															"icon": "minus",
															"color": "success",
															"v-on:click": "addChatHistory()",
															"model": "rec.button_add",
															"class": ["basic", "small", "circular"],
															"style": "width: 34px !important; min-width: 34px !important; padding-left: 12px;"
														}
													},
													{
														"component": "nc-button",
														"attribute": {
															"icon": "plus",
															"color": "danger",
															"v-on:click": "deleteChatHistory()",
															"model": "rec.button_delete",
															"class": ["basic", "small", "circular"],
															"style": "width: 34px !important; min-width: 34px !important; padding-left: 12px;"
														}
													}
												]
											}
										]
									},
									{
										"component": "nc-row",
										"element": [
											{
												"component": "nc-grid",
												"attribute": {
													"id": "chat_history",
													"height": "calc(100vh - 12em)",
													"model": "grid.chat_topic"
												}
											}
										]
									}
								]
							}
						]
					},
					{
						"component": "nc-col",
						"attribute": {
							"width": "1em"
						},
						"element": [
							{
								"component": "nc-line-v",
								"attribute": {
									"height": "calc(100vh - 10em)"
								}
							}
						]
					},
					{
						"component": "nc-col",
						"attribute": {
							"width": "auto"
						},
						"element": [
							{
								"component": "nc-row",
								"element": [
									{
										"component": "nc-row",
										"element": [
											{
												"component": "nc-row",
												"element": [
													{
														"component": "nc-col",
														"attribute": {
															"width": "auto",
															"class": ["nc-end-h"],
															"style": "margin-left: auto;"
														},
														"element": [
															{
																"component": "nc-label-dropdown",
																"text": "Prompt type",
																"attribute": {
																	"model": "rec.default_prompt"
																}
															}
														]
													}
												]
											},
											{
												"component": "nc-row",
												"element": [
													{
														"component": "nc-col",
														"attribute": {
															"width": "auto"
														},
														"element": [
															{
																"component": "nc-label-textarea",
																"text": "Answer",
																"attribute": {
																	"model": "rec.chat_answer",
																	"height": "calc(100vh - 29em)"
																}
															}
														]
													}
												]
											}
										]
									}
								]
							},
							{
								"component": "nc-row",
								"element": [
									{
										"component": "nc-col",
										"attribute": {
											"width": "75%"
										},
										"element": [
											{
												"component": "nc-label-textarea",
												"text": "Question",
												"attribute": {
													"model": "rec.chat_question",
													"height": "10em"
												}
											}
										]
									},
									{
										"component": "nc-col",
										"attribute": {
											"width": "25%"
										},
										"element": [
											{
												"component": "nc-droparea",
												"attribute": {
													":clickable": "false",
													"v-show": "rec.tab_document !== 'stock_map'",
													":style": "{width: '100%', 'margin-top': '1.6em', height: '10em'}",
													"v-on:import-file": "importFile"
												},
												"element": [
													{
														"component": "nc-grid",
														"attribute": {
															"id": "document",
															":style": "{width: '100%', 'margin-top': '0px', 'padding-bottom': '1px', height: '10em'}",
															"model": "grid.document",
															"v-on:grid-row-clicked": "gridRowClicked",
															"v-on:grid-row-double-clicked": "gridRowDoubleClicked"
														}
													}
												]
											}
										]
									},
									{
										"component": "nc-col",
										"attribute": {
											"class": ["nc-margin-top", "nc-end-h", "nc-align-bottom"],
											"style": "margin-left: auto;"
										},
										"element": [
											{
												"component": "nc-button",
												"text": "Send",
												"attribute": {
													"class": ["nc-button-wide"],
													"color": "primary",
													"v-on:click": "sendChat()",
													"model": "rec.question_send"
												}
											}
										]
									}
								]
							}
						]
					}
				]
			}
		]
	}
}
