{
  "long_form": {
    "type": "panel",
    "controls": [
      {
        "long_form@common_dialogs.main_panel_no_buttons": {
          "$title_panel": "common_dialogs.standard_title_label",
          "$title_size": [ "100% - 15px", 10 ],
          "$title_max_size": [ "100% - 15px", 10 ],
          "size": [400, 230],
          "$text_name": "#title_text",
          "$title_text_binding_type": "none",
          "$child_control": "server_form.long_form_panel",
          "layer": 2,
          "bindings": [
            {
              "binding_name": "#title_text"
            },
            {
              "binding_type": "view",
              "source_property_name": "((#title_text - 'Camera') = #title_text and (#title_text - 'Laptop') = #title_text and (#title_text - 'phone') = #title_text)",
              "target_property_name": "#visible"
            }
          ]
        }
      },
      {
        "long_form_cam@ccam_form.menu": {
          "bindings": [
            {
              "binding_name": "#title_text"
            },
            {
              "binding_type": "view",
              "source_property_name": "(#title_text = 'Cinematic Camera')",
              "target_property_name": "#visible"
            }
          ]
        }
      },
      {
        "long_form_phone@phone.menu": {
          "bindings": [
            {
              "binding_name": "#title_text"
            },
            {
              "binding_type": "view",
              "source_property_name": "(not ((#title_text - 'phone') = #title_text))",
              "target_property_name": "#visible"
            }
          ]
        }
      },
      {
        "long_form_laptop@laptop.menu": {
          "bindings": [
            {
              "binding_name": "#title_text"
            },
            {
              "binding_type": "view",
              "source_property_name": "(#title_text = 'Laptop')",
              "target_property_name": "#visible"
            }
          ]
        }
      }
    ]
  },
  "custom_form@common_dialogs.main_panel_no_buttons": {
    "$title_panel": "common_dialogs.standard_title_label",
    "$title_size": [ "100% - 15px", 10 ],
    "$title_max_size": [ "100% - 15px", 10 ],
    "size": [400, 230],
    "$text_name": "#title_text",
    "$title_text_binding_type": "none",
    "$child_control": "server_form.custom_form_panel",
    "layer": 2,
    "variables": [
      {
        "requires": "(#title_text = 'Cinematic Camera')",
        "$custom_background": "ccam_form.custom_background"
      }
    ],
    "bindings": [
      {
        "binding_name": "#title_text"
      }
    ]
  },
	"custom_panel_main": {
		"type": "stack_panel",
       "$off | default": [ 0, 0 ],
		"size": ["100%", "100%"],
		"orientation": "vertical",
		"layer": 1,
		"anchor_from": "top_left",
		"anchor_to": "top_left",
		"controls": [
			{
				"scrolling_panel@common.scrolling_panel": {
					"anchor_to": "top_left",
					"anchor_from": "top_left",
					"$show_background": false,
					"size": ["100%", "100%"],
					"$scrolling_content": "server_form.custom_panel",
					"$scroll_size": [3, "100% - 4px"],
					"$scrolling_pane_size": ["100% - 4px", "100% - 2px"],
					"$scrolling_pane_offset": [1, 0],
					"$scroll_bar_right_padding_size": [0, 0]
				}
			}
		]
	},

	"custom_panel": {
		"type": "stack_panel",
		"size": ["100%", "100%c"],
		"orientation": "vertical",
		"controls": [
      {
        "label_offset_panel": {
          "type": "panel",
          "size": ["100%", "100%c"],
          "controls": [
            {
              "main_label": {
                "type": "label",
                "offset":[2,5],
                "color": "$main_header_text_color",
                "size": ["100%", "default"],
                "anchor_from": "top_left",
                "anchor_to": "top_left",
                "text": "#form_text"
              }
            }
          ]
        }
      },
			{
				"long_form_dynamic_buttons_panel": {
					"type": "grid",
					"size": ["100%", "100%c"],
					"grid_dimensions": [3, 3],
					"grid_item_template": "server_form.custom_button",
					"grid_fill_direction": "horizontal",
					"grid_rescaling_type": "horizontal",
					"anchor_from": "center",
					"anchor_to": "center",
					"factory": {
						"name": "buttons",
						"control_name": "server_form.custom_button"
					},
					"collection_name": "form_buttons",
					"bindings": [
						{
							"binding_name": "#form_button_length",
							"binding_name_override": "#maximum_grid_items"
						}
					]
				}
			}
		]
	},
	"custom_button": {
		"type": "panel",
       "$csize | default": [ 64, 64 ],
       "$iconsize | default": [ 32, 32 ],
       "$padding | default": [ 64, 64 ],
       "$cbutton|default": "textures/ui/button_borderless_light",
	    "size": "$padding",
		"controls": [
			{
				"main_ui": {
					"type": "panel",
					"size": "$csize",
					"controls": [
						{
							"panel_name": {
								"type": "panel",
								"size": "$csize",
								"bindings": [
									{
										"binding_type": "view",
										"source_control_name": "image",
										"resolve_sibling_scope": true,
										"source_property_name": "(not (#texture = ''))",
										"target_property_name": "#visible"
									}
								],
								"controls": [
									{
										"image": {
											"type": "image",
											"layer": 20,
											"size": "$iconsize",
											"offset": [0, -5],
											"bindings": [
												{
													"binding_name": "#form_button_texture",
													"binding_name_override": "#texture",
													"binding_type": "collection",
													"binding_collection_name": "form_buttons"
												},
												{
													"binding_name": "#form_button_texture_file_system",
													"binding_name_override": "#texture_file_system",
													"binding_type": "collection",
													"binding_collection_name": "form_buttons"
												},
												{
													"binding_type": "view",
													"source_property_name": "(not ((#texture = '') or (#texture = 'loading')))",
													"target_property_name": "#visible"
												}
											]
										}
									},
									{
										"text": {
											"type": "label",
											"text": "#form_button_text",
		                              "font_type": "MinecraftTen",
									       "layer": 16,
											"color": [0, 0, 0],
											"offset": [0, -8],
											"anchor_from": "bottom_middle",
											"bindings": [
												{
													"binding_name": "#form_button_text",
													"binding_type": "collection",
													"binding_collection_name": "form_buttons"
												}
											]
										}
									}
								]
							}
						},
						{
							"form_button@common_buttons.light_text_button": {
								"$pressed_button_name": "button.form_button_click",
								"anchor_from": "top_left",
								"anchor_to": "top_left",
								"size": "$csize",
								"$button_text": "#null",
								"$button_text_binding_type": "collection",
								"$button_text_grid_collection_name": "form_buttons",
								"$button_text_max_size": ["100%", 20],
                           "$default_button_texture": "$cbutton",
                           "$border_visible": false,
								"bindings": [
									{
										"binding_type": "collection_details",
										"binding_collection_name": "form_buttons"
									}
								]
							}
						}
					]
				}
			}
		],
          "bindings": [
	        {
		      "binding_name": "#form_button_text",
				"binding_type": "collection",
				"binding_collection_name": "form_buttons"
			  },
            {
              "binding_type": "view",
              "source_property_name": "(not (#form_button_text = ''))",
              "target_property_name": "#visible"
            }
          ]
	}
}