/********************************************************
+*   (c) Mojang. All rights reserved                    *
+*   (c) Microsoft. All rights reserved.                *
+********************************************************/

{
	"namespace": "braze",

	"title_label": {
		"type": "panel",
		"anchor_from": "top_middle",
		"anchor_to": "top_middle",
		"$title_size|default": [ "100%c", 10 ],
		"size": "$title_size",
		"$title_offset|default": [ 0, 9 ],
		"offset": "$title_offset",
		"$use_custom_title_control|default": false,
		"$custom_title_label|default": "common.empty_panel",
		"$title_binding_condition|default": "always",
		"$title_text_binding_type|default": "global",
		"controls": [
			{
				"common_dialogs_0@common_dialogs.standard_title_label": {
					"ignored": "$use_custom_title_control"
				}
			}
		]
	},

	"padding": {
		"type": "panel",
		"size": [ "100%", 2 ]
	},

	"image_panel": {
		"type": "panel",
		"size": [ "100%", "100%c + 2px" ],
		"controls": [
			{
				"image": {
					"type": "image",
					"texture": "#image_texture",
					"texture_file_system": "RawPath",
					"size": [ "100% - 2px", "42.86%x" ],
					"controls": [
						{
							"border@common.square_image_border_white": {
								"size": [ "100% + 2px", "100% + 2px" ],
								"layer": 2,
								"color": [ 0, 0, 0 ]
							}
						}
					],
					"bindings": [
						{
							"binding_name": "#image_texture",
							"binding_name_override": "#texture"
						}
					]
				}
			}
		]
	},

	"dialog_content": {
		"type": "stack_panel",
		"size": [ "100% - 4px", "100% - 4px" ],
		"controls": [
			{
				"image_panel@braze.image_panel": {}
			},
			{
				"padding_0@braze.padding": {}
			},
			{
				"scrolling_panel@common.scrolling_panel": {
					"$show_background": false,
					"$scroll_box_visible_touch": true,
					"size": [ "100%", "fill" ],
					"$scrolling_content": "braze.description_label_panel",
					"$scroll_size": [ 5, "100%" ],
					"$scrolling_pane_size": [ "100%", "100%" ],
					"$scrolling_pane_offset": [ 0, 0 ],
					"$scroll_bar_right_padding_size": [ 0, 0 ]
				}
			},
			{
				"padding_1@braze.padding": {}
			},
			{
				"button_panel": {
					"type": "stack_panel",
					"orientation": "horizontal",
					"size": [ "100%", 30 ],
					"controls": [
						{
							"left_button@common_buttons.light_text_button": {
								"$pressed_button_name": "button.left_button",
								"$button_text": "#leftButton_text",
								"size": [ "50% - 1px", 30 ],
								"$button_text_max_size": [ "100%", 20 ],
								"$button_text_binding_type": "global"
							}
						},
						{
							"padding": {
								"type": "panel",
								"size": [ 2, "100%" ]
							}
						},
						{
							"right_button@common_buttons.light_text_button": {
								"$pressed_button_name": "button.right_button",
								"$button_text": "#rightButton_text",
								"size": [ "50% - 1px", 30 ],
								"$button_text_max_size": [ "100%", 20 ],
								"$button_text_binding_type": "global"
							}
						}
					]
				}
			}
		]
	},

	"description_label_panel": {
		"type": "stack_panel",
		"size": [ "100%", "100%c" ],
		"layer": 1,
		"$font_scale": 1.2,
		"controls": [
			{
				"line1": {
					"type": "label",
					"size": [ "100%", "default" ],
					"text": "#body_text",
					"font_type": "smooth",
					"color": "$body_text_color",
					"font_scale_factor": "$font_scale",
					"bindings": [
						{
							"binding_name": "#body_text"
						}
					]
				}
			}
		]
	},

	// -----------------------------------------------
	//
	//    screen
	//
	// -----------------------------------------------
	"braze_screen@common.base_screen": {
		"$screen_content": "braze.braze_screen_content"
	},

	"braze_screen_content": {
		"type": "panel",
		"controls": [
			{
				"root_panel": {
					"type": "panel",
					"controls": [
						{ "dialog@braze.screen_dialog": { "layer": 1 } }
					]
				}
			}
		]
	},

	"screen_dialog@common_dialogs.main_panel_no_buttons": {
		"$text_name": "#headline_text",
		"$child_control": "braze.dialog_content",
		"$show_close_button": true,
		"size": [ 240, "100% - 4px" ],
		"controls": [
			{
				"common_panel@common.common_panel": { "$dialog_background": "$custom_background" }
			},
			{
				"title_label@braze.title_label": {}
			},
			{
				"panel_indent": {
					"type": "panel",
					"size": "$panel_indent_size",
					"offset": [ 0, 23 ],
					"anchor_from": "top_middle",
					"anchor_to": "top_middle",
					"controls": [
						{ "inside_header_panel@$child_control": {} }
					]
				}
			}
		]
	}
}