/********************************************************
+*   (c) Mojang. All rights reserved                       *
+*   (c) Microsoft. All rights reserved.                   *
+*********************************************************/

{
  "namespace": "settings_common",

  "arrow_image": {
    "$alpha|default": 1.0,
    "type": "image",
    "layer": 1,
    "texture": "textures/ui/arrowRight",
    "size": [ 8, 8 ],
    "alpha": "$alpha"
  },

  "subsection_title": {
    "type": "stack_panel",
    "orientation": "vertical",
    "size": [ "100%", "100%c + 10px" ],
    "$text|default": "",
    "controls": [
      {
        "spacer_0": {
          "type": "panel",
          "size": [ "100%", 4 ]
        }
      },
      {
        "sizer_0": {
          "type": "panel",
          "size": [ "100%", "100%c" ],
          "controls": [
            {
              "title": {
                "type": "label",
                "color": "$main_header_text_color",
                "text_alignment": "center",
                "anchor_from": "center",
                "anchor_to": "center",
                "layer": 3,
                "text": "$text"
              }
            }
          ]
        }
      },
      {
        "spacer_1": {
          "type": "panel",
          "size": [ "100%", 2 ]
        }
      },
      {
        "sizer_1": {
          "type": "panel",
          "size": [ "100%", "100%c" ],
          "controls": [
            {
              "section_divider": {
                "type": "image",
                "size": [ "100% - 4px", 1 ],
                "anchor_from": "center",
                "anchor_to": "center",
                "layer": 3,
                "texture": "textures/ui/list_item_divider_line_light"
              }
            }
          ]
        }
      }
    ]
  },

  "action_button@common_buttons.light_text_button": {
    "$pressed_button_name|default": "unset_button_name",
    "$button_text|default": "unset $button_text",
    "size": [ "100%", 30 ],
    "anchor_from": "center",
    "anchor_to": "center"
  },

  "action_button_dark_text@common_buttons.dark_text_button": {
    "$pressed_button_name|default": "unset_button_name",
    "$button_text|default": "unset $button_text",
    "size": [ "100%", 30 ],
    "anchor_from": "center",
    "anchor_to": "center"
  },

  "link_button@common_buttons.hyperlink_button": {
    "$button_text|default": "unset $button_text",
    "size": [ "100%", 30 ],
    "$button_size_override": [ "100%", "100% + 1px" ],
    "anchor_from": "center",
    "anchor_to": "center",
    "property_bag": {
      "#hyperlink": "unset #hyperlink in property_bag"
    }
  },

  "option_group_label": {
    "type": "panel",
    "size": [ "100%", "100%c + 9px" ],
    "$text|default": "unset $text",
    "$text_bindings|default": [],
    "$font_type|default": "default",
    "$font_scale_factor|default": 1,
    "$font_size|default": "normal",
    "controls": [
      {
        "text": {
          "type": "label",
          "color": "$main_header_text_color",
          "text": "$text",
          "anchor_from": "top_left",
          "anchor_to": "top_left",
          "max_size": [ "100%", "default" ],
          "offset": [ 0, 4 ],
          "locked_alpha": 0.5,
          "bindings": "$text_bindings",
          "font_type": "$font_type",
          "font_size": "$font_size",
          "font_scale_factor": "$font_scale_factor"
        }
      }
    ]
  },

  "option_group_header": {
    "type": "panel",
    "size": [ "100%", "100%c - 4px" ],
    "$font_size": "large",
    "controls": [
      { "text@settings_common.option_group_label": {} }
    ]
  },

  // Adds a little space (configurable) before the control.
  "option_group_spaced_label": {
    "type": "panel",
    "$text|default": "unset $text",
    "$option_group_spaced_header_size|default": [ "100%", "100%c + 2px" ],
    "$option_group_spaced_header_size_offset|default": [ 0, 2 ],
    "size": "$option_group_spaced_header_size",
    "offset": "$option_group_spaced_header_size_offset",
    "controls": [
      { "text@settings_common.option_group_label": {} }
    ]
  },

  // Adds a little space (configurable) before the control.
  "option_group_spaced_header": {
    "type": "panel",
    "$text|default": "unset $text",
    "$font_size": "large",
    "$option_group_spaced_header_size|default": [ "100%", "100%c" ],
    "$option_group_spaced_header_size_offset|default": [ 0, 4 ],
    "size": "$option_group_spaced_header_size",
    "offset": "$option_group_spaced_header_size_offset",
    "controls": [
      { "text@settings_common.option_group_label": {} }
    ]
  },

  "option_group_section_divider": {
    "type": "panel",
    "$size|default": [ "100%", "9px" ],
    "size": "$size",
    "controls": [
      {
        "background": {
          "type": "image",
          "size": [ "100%", 1 ],
          "anchor_from": "center",
          "anchor_to": "center",
          "layer": 3,
          "texture": "textures/ui/list_item_divider_line_light"
        }
      }
    ]
  },

  "option_generic": {
    "type": "panel",
    "$option_generic_panel_size|default": [ "100%", "100%c" ],
    "size": "$option_generic_panel_size",
    "$enabled|default": true,
    "$option_enabled_binding_name|default": "",
    "$option_tooltip_binding_type|default": "none",
    "$option_tooltip_collection_name|default": "",
    "$option_tooltip_text_binding_name|default": "",
    "$option_tooltip_visible_binding_name|default": "#default_visibility",
    "$option_tooltip_icon|default": "textures/ui/infobulb",
    "controls": [
      { "option_generic_core@settings_common.option_generic_core": {} }
    ]
  },

  "white_label": {
    "type": "label",
    "color": "$main_header_text_color",
    "text": "$text"
  },

  // option_generic and option_generic_core are separated so that $enabled and
  // $option_enabled_binding_name are guaranteed to be defined - otherwise, the
  // variables section now in option_generic_core chokes.
  "option_generic_core": {
    "$allow_data_binding|default": true,
    "$option_label|default": "",
    "$show_option_label|default": true,
    "$label_bindings|default": [],
    "$one_line_layout|default": false,
    "$has_option_description|default": false,
    "$option_description|default": "",
    "$option_enabled_binding_type|default": "global",
    "$option_label_alignment|default": "left",
    "$option_tooltip_binding_type|default": "none",
    "$option_tooltip_collection_name|default": "",
    "$option_tooltip_popup_visible_binding|default": false,
    "$option_tooltip_text_binding_name|default": "",
    "$option_tooltip_visible_binding_name|default": "#default_visibility",
    "$option_tooltip_icon|default": "textures/ui/infobulb",
    "$label_offset|default": [ 0, 0 ],
    "$disable_label_tts_focus_border|default": false,
    "type": "stack_panel",
    "size": [ "100%", "100%c" ],
    "enabled": "$enabled",
    "variables": [
      {
        "requires": "(not $enabled or not $option_enabled_binding_name)",
        "$option_enabled_binding_type": "none",
        "$option_enabled_binding_name": "#not_data_bound"
      }
    ],
    "bindings": [
      {
        "binding_type": "$option_enabled_binding_type",
        "binding_name": "$option_enabled_binding_name",
        "binding_name_override": "#enabled"
      }
    ],
    "controls": [
      {
        "two_line_layout": {
          "ignored": "($one_line_layout)",
          "type": "stack_panel",
          "orientation": "vertical",
          "size": [ "100%", "100%c" ],
          "controls": [
            {
              "option_label_panel": {
                "type": "panel",
                "size": [ "100%", "100%cm" ],
                "controls": [
                  {
                    "option_label_subpanel_01": {
                      "bindings": [
                        {
                          "binding_name": "($option_tooltip_text_binding_name = '')",
                          "binding_type": "$option_tooltip_binding_type",
                          "binding_collection_name": "$option_tooltip_collection_name",
                          "binding_name_override": "#visible"
                        }
                      ],
                      "type": "panel",
                      "size": [ "100%", "100%c" ],
                      "controls": [
                        {
                          "option_label@option_generic_core_label": {
                            "$option_generic_core_label_size": [ "100%", "default" ]
                          }
                        }
                      ]
                    }
                  },
                  {
                    "option_label_subpanel_02": {
                      "ignored": "($option_tooltip_text_binding_name = '')",
                      "bindings": [
                        {
                          "binding_name": "(not ($option_tooltip_text_binding_name = ''))",
                          "binding_type": "$option_tooltip_binding_type",
                          "binding_collection_name": "$option_tooltip_collection_name",
                          "binding_name_override": "#visible"
                        }
                      ],
                      "type": "panel",
                      "anchor_from": "top_left",
                      "anchor_to": "top_left",
                      "size": [ "100% - 28px", "100%c" ],
                      "controls": [
                        {
                          "option_label@option_generic_core_label": {
                            "$option_generic_core_label_size": [ "100%", "default" ]
                          }
                        }
                      ]
                    }
                  },
                  {
                    "option_tooltip@settings_common.option_generic_tooltip": {
                      "ignored": "($option_tooltip_text_binding_name = '')",
                      "$tooltip_button_binding_type": "$option_tooltip_binding_type",
                      "$tooltip_button_collection_name": "$option_tooltip_collection_name",
                      "$tooltip_text_binding_name": "$option_tooltip_text_binding_name",
                      "$tooltip_area": "$option_tooltip_area",
                      "$tooltip_visible_binding_name": "$option_tooltip_visible_binding_name",
                      "$tooltip_icon": "$option_tooltip_icon"
                    }
                  },
                  {
                    "label_tts_focus_border@common.non_interact_focus_border_button": {
                      "ignored": "($disable_label_tts_focus_border or ($option_label = ''))",
                      "size": [ "100%", "100%sm" ],
                      "tts_inherit_siblings": true,
                      "consume_hover_events": false,
                      "focus_magnet_enabled": false,
                      "bindings": [
                        {
                          "binding_type": "global",
                          "binding_name": "#tts_enabled",
                          "binding_name_override": "#visible"
                        }
                      ]
                    }
                  }
                ]
              }
            },
            {
              "spacer": {
                "type": "panel",
                "visible": "$show_option_label",
                "size": [ 0, 1 ]
              }
            },
            {
              "option_description_panel": {
                "ignored": "(not $has_option_description)",
                "type": "panel",
                "size": [ "100%", "100%cm" ],
                "controls": [
                  {
                    "option_descriptive_text_0": {
                      "type": "label",
                      "text_alignment": "$option_label_alignment",
                      "size": [ "100%", "default" ],
                      "min_size": [ 0, 0 ],
                      "color": "$option_description_text_color",
                      "text": "$option_description",
                      "visible": "$show_option_label",
                      "anchor_from": "top_left",
                      "anchor_to": "top_left",
                      "locked_alpha": 0.5
                    }
                  },
                  {
                    "description_tts_focus_border@common.non_interact_focus_border_button": {
                      "size": [ "100%", "100%sm" ],
                      "tts_inherit_siblings": true,
                      "consume_hover_events": false,
                      "focus_magnet_enabled": false,
                      "bindings": [
                        {
                          "binding_type": "global",
                          "binding_name": "#tts_enabled",
                          "binding_name_override": "#visible"
                        }
                      ]
                    }
                  }
                ]
              }
            },
            {
              "spacer2": {
                "type": "panel",
                "visible": "$show_option_label",
                "size": [ 0, 1 ]
              }
            },
            {
              "$control_name@$control_name": {
                "anchor_from": "top_left",
                "anchor_to": "top_left"
              }
            }
          ]
        }
      },
      {
        "one_line_layout": {
          "ignored": "(not $one_line_layout)",
          "type": "panel",
          // Since the label and control are on the same line in this layout,
          // the height of the overall control should *not* be the sum of the
          // heights of the two, which is what a height of "100%c" alone would
          // mean, regardless of how the label and control are positioned
          // relative to each other.  Instead, the height should be the max of
          // the two heights.  Right now, the only control using this layout is
          // the toggle, meaning that height is either 16px (the height of the
          // toggle itself) or 100%c-16px (the height of the label, which varies
          // due to line wrapping, and can only be obtained by subtracting the
          // known height of the toggle, 16px, from the sum of the heights of
          // the toggle and label, 100%c.
          // Add 2px for spacing between label and description).
          // If this layout is used for any other controls, then $line_size and
          // $min_line_size will need to be changed accordingly, just like
          // $label_size and $label_offset.
          "$line_size|default": [ "100%", "100%c - 16px + 2px" ],
          "$line_min_size|default": [ "100%", "16px" ],
          "size": "$line_size",
          "min_size": "$line_min_size",
          "$label_size|default": [ "100% - 34px", "default" ],
          "$label_offset|default": [ 34, 3 ],
          "controls": [
            {
              "option_label_subpanel_01": {
                "bindings": [
                  {
                    "binding_name": "($option_tooltip_text_binding_name = '')",
                    "binding_type": "$option_tooltip_binding_type",
                    "binding_collection_name": "$option_tooltip_collection_name",
                    "binding_name_override": "#visible"
                  }
                ],
                "type": "panel",
                "size": [ "100%", "100%c" ],
                "anchor_from": "top_left",
                "anchor_to": "top_left",
                "controls": [
                  {
                    "$control_name@$control_name": {
                      "anchor_from": "top_left",
                      "anchor_to": "top_left"
                    }
                  },
                  {
                    "option_label@option_generic_core_label": {
                      "$option_generic_core_label_size": "$label_size",
                      "$option_generic_core_label_anchor_from": "top_left",
                      "$option_generic_core_label_anchor_to": "top_left"
                    }
                  }
                ]
              }
            },
            {
              "option_label_subpanel_02": {
                "ignored": "($option_tooltip_text_binding_name = '')",
                "bindings": [
                  {
                    "binding_name": "(not ($option_tooltip_text_binding_name = ''))",
                    "binding_type": "$option_tooltip_binding_type",
                    "binding_collection_name": "$option_tooltip_collection_name",
                    "binding_name_override": "#visible"
                  }
                ],
                "type": "panel",
                "anchor_from": "top_left",
                "anchor_to": "top_left",
                "size": [ "100% - 28px", "100%c" ],
                "controls": [
                  {
                    "$control_name@$control_name": {
                      "anchor_from": "top_left",
                      "anchor_to": "top_left"
                    }
                  },
                  {
                    "option_label@option_generic_core_label": {
                      "$option_generic_core_label_size": "$label_size",
                      "$option_generic_core_label_anchor_from": "top_left",
                      "$option_generic_core_label_anchor_to": "top_left"
                    }
                  }
                ]
              }
            },
            {
              "option_description_panel": {
                "ignored": "(not $has_option_description)",
                "type": "panel",
                "size": [ "100%", "100%cm" ],
                "anchor_from": "bottom_left",
                "anchor_to": "bottom_left",
                "controls": [
                  {
                    "option_descriptive_text": {
                      "type": "label",
                      "text_alignment": "$option_label_alignment",
                      "size": "$label_size",
                      "offset": "$label_offset",
                      "min_size": [ 0, 0 ],
                      "color": "$option_description_text_color",
                      "text": "$option_description",
                      "visible": "$show_option_label",
                      "locked_alpha": 0.5
                    }
                  },
                  {
                    "description_tts_focus_border@common.non_interact_focus_border_button": {
                      "size": [ "100%", "100%sm" ],
                      "tts_inherit_siblings": true,
                      "consume_hover_events": false,
                      "focus_magnet_enabled": false,
                      "bindings": [
                        {
                          "binding_type": "global",
                          "binding_name": "#tts_enabled",
                          "binding_name_override": "#visible"
                        }
                      ]
                    }
                  }
                ]
              }
            },
            {
              "option_tooltip@settings_common.option_generic_tooltip": {
                "ignored": "($option_tooltip_text_binding_name = '')",
                "$tooltip_button_binding_type": "$option_tooltip_binding_type",
                "$tooltip_button_collection_name": "$option_tooltip_collection_name",
                "$tooltip_text_binding_name": "$option_tooltip_text_binding_name",
                "$tooltip_area": "$option_tooltip_area",
                "$tooltip_two_line_layout": false,
                "$tooltip_visible_binding_name": "$option_tooltip_visible_binding_name",
                "$tooltip_icon": "$option_tooltip_icon"
              }
            }
          ]
        }
      },
      {
        "spacer": {
          "type": "panel",
          "size": [ 0, 4 ]
        }
      }
    ]
  },

  "option_generic_core_label": {
    "$option_generic_core_label_size|default": [ "100%", "default" ],
    "$option_generic_core_label_anchor_from|default": "center",
    "$option_generic_core_label_anchor_to|default": "center",
    "type": "label",
    "text_alignment": "$option_label_alignment",
    "color": "$main_header_text_color",
    "size": "$option_generic_core_label_size",
    "offset": "$label_offset",
    "anchor_from": "$option_generic_core_label_anchor_from",
    "anchor_to": "$option_generic_core_label_anchor_to",
    "layer": 1,
    "text": "$option_label",
    "visible": "$show_option_label",
    "bindings": "$label_bindings",
    "locked_alpha": 0.5
  },

  "option_generic_tooltip_image": {
    "type": "image",
    "size": [ 7, 11 ]
  },

  "option_generic_tooltip_top_popup@common.static_tooltip_popup_with_image_and_text": {
    "size": [ "100% - 4px", "100%cm + 8px" ],
    "anchor_from": "top_middle",
    "anchor_to": "bottom_middle",
    "$tooltip_panel_offset": [ 0, -10 ],
    "$tooltip_popup_image": "textures/ui/infobulb",
    "$tooltip_button_binding_type|default": "collection",
    "$tooltip_button_collection_name|default": "",
    "$tooltip_popup_visible_use_binding": false,
    "$tooltip_text_binding_name|default": "",
    "$tooltip_chevron_anchor": "bottom_right",
    "$tooltip_popup_chevron_offset": [ "-30%x", "100%y - 3px" ],
    "visible": false,
    "bindings": []
  },

  "option_generic_tooltip_bottom_popup@common.static_tooltip_popup_with_image_and_text": {
    "size": [ "100% - 4px", "100%cm + 8px" ],
    "anchor_from": "bottom_middle",
    "anchor_to": "top_middle",
    "$tooltip_panel_offset": [ 0, 20 ],
    "$tooltip_popup_image": "textures/ui/infobulb",
    "$tooltip_popup_chevron_texture": "textures/ui/tooltip_inverted_chevron",
    "$tooltip_button_binding_type|default": "collection",
    "$tooltip_button_collection_name|default": "",
    "$tooltip_popup_visible_use_binding": false,
    "$tooltip_text_binding_name|default": "",
    "$tooltip_chevron_anchor": "top_right",
    "$tooltip_popup_chevron_offset": [ "-30%x", "-100%y + 3px" ],
    "visible": false,
    "bindings": []
  },

  "option_generic_tooltip": {
    "type": "panel",
    "size": [ "100%", 0 ],
    "anchor_from": "top_right",
    "anchor_to": "top_right",
    "$tooltip_name|default": "tooltip_control",
    "$tooltip_button_binding_type|default": "",
    "$tooltip_button_collection_name|default": "",
    "$tooltip_popup_visible_binding|default": false,
    "$tooltip_text_binding_name|default": "",
    "$tooltip_visible_binding_name|default": "#default_visibility",
    "$tooltip_two_line_layout|default": true,
    "$tooltip_icon|default": "textures/ui/infobulb",
    "property_bag": {
      "#default_visibility": true
    },
    "bindings": [
      {
        "binding_name": "((not ($tooltip_text_binding_name = '')) and ($tooltip_visible_binding_name))",
        "binding_type": "$tooltip_button_binding_type",
        "binding_collection_name": "$tooltip_button_collection_name",
        "binding_condition": "always",
        "binding_name_override": "#visible"
      }
    ],
    "controls": [
      {
        "focus_detection_input_panel_two_line_layout": {
          "ignored": "(not $tooltip_two_line_layout)",
          "type": "tooltip_trigger",
          "tooltip_name": "$tooltip_name",
          "tooltip_top_content_control": "option_generic_tooltip_top_popup",
          "tooltip_bottom_content_control": "option_generic_tooltip_bottom_popup",
          "tooltip_area": "$tooltip_area",
          "size": [ 1, 1 ],
          "layer": 3,
          "anchor_from": "top_middle",
          "anchor_to": "top_middle",
          "focus_change_right": "FOCUS_OVERRIDE_STOP",
          "focus_enabled": true,
          "focus_wrap_enabled": false,
          "enabled": "$tooltip_two_line_layout",
          "focus_magnet_enabled": true,
          "consume_hover_events": false,
          "tts_skip_message": false,
          "tts_ignore_count": true,
          "tooltip_tts_value": "$tooltip_text_binding_name",
          "bindings": [
            {
              "binding_name": "$tooltip_text_binding_name",
              "binding_collection_name": "$tooltip_button_collection_name",
              "binding_type": "$tooltip_button_binding_type",
              "binding_condition": "visibility_changed",
              "binding_name_override": "$tooltip_text_binding_name"
            }
          ]
        }
      },
      {
        "hover_detection_input_panel": {
          "type": "tooltip_trigger",
          "offset": [ -14, 0 ],
          "size": [ 7, 11 ],
          "anchor_from": "top_right",
          "anchor_to": "top_right",
          "layer": 3,
          "$tooltip_focus_change_left|default": "",
          "variables": [
            {
              "requires": "$tooltip_two_line_layout",
              "$tooltip_focus_change_left": "FOCUS_OVERRIDE_STOP"
            }
          ],
          "tooltip_name": "tooltip_control_icon",
          "tooltip_top_content_control": "option_generic_tooltip_top_popup",
          "tooltip_bottom_content_control": "option_generic_tooltip_bottom_popup",
          "tooltip_area": "$tooltip_area",
          "consume_hover_events": true,
          "focus_change_left": "$tooltip_focus_change_left",
          "focus_enabled": true,
          "tts_skip_message": false,
          "tts_ignore_count": true,
          "tooltip_tts_value": "$tooltip_text_binding_name",
          "bindings": [
            {
              "binding_name": "$tooltip_text_binding_name",
              "binding_collection_name": "$tooltip_button_collection_name",
              "binding_type": "$tooltip_button_binding_type",
              "binding_condition": "visibility_changed",
              "binding_name_override": "$tooltip_text_binding_name"
            }
          ],
          "controls": [
            {
              "option_generic_tooltip_image@settings_common.option_generic_tooltip_image": {
                "texture": "$tooltip_icon"
              }
            }
          ]
        }
      },
      { "option_generic_tooltip_top_popup@settings_common.option_generic_tooltip_top_popup": {} },
      { "option_generic_tooltip_bottom_popup@settings_common.option_generic_tooltip_bottom_popup": {} }
    ]
  },

  "option_text_edit_control@common.text_edit_box": {
    "$option_text_edit_control_size|default": [ "100%", "30px" ],
    "size": "$option_text_edit_control_size",
    "max_length": "$max_text_edit_length",
    "$text_edit_box_content_binding_name": "$option_binding_name",
    "$text_edit_box_binding_collection_name": "$option_binding_name",
    "$text_edit_box_binding_type": "global",
    "$text_box_enabled_binding_name": "$option_enabled_binding_name",
    "enabled": "$enabled",
    "$place_holder_text": "$option_place_holder_text",
    "$text_box_tts_header": "$option_label",
    "$tts_override_control_value|default": " ",
    "tts_override_control_value": "$tts_override_control_value",

    "variables": [
      {
        "requires": "(not $option_enabled_binding_name or not $enabled)",
        "$text_box_enabled_binding_name": "#not_data_bound",
        "$text_edit_box_enabled_binding_type": "none"
      }
    ]
  },

  "option_text_edit_control_with_button": {
    "type": "stack_panel",
    "orientation": "horizontal",
    "size": [ "100%", "30px" ],
    "controls": [
      {
        "text_box@common.text_edit_box": {
          "size": [ "85%", "100%" ],
          "max_length": "$max_text_edit_length",
          "$text_edit_box_content_binding_name": "$option_binding_name",
          "$text_edit_box_binding_collection_name": "$option_binding_name",
          "$text_edit_box_binding_type": "global",
          "$text_box_enabled_binding_name": "$option_enabled_binding_name",
          "enabled": "$enabled",
          "$place_holder_text": "$option_place_holder_text",

          "$text_box_tts_header": "$option_label",
          "variables": [
            {
              "requires": "(not $option_enabled_binding_name or not $enabled)",
              "$text_box_enabled_binding_name": "#not_data_bound",
              "$text_edit_box_enabled_binding_type": "none"
            }
          ]
        }
      },
      {
        "button@common_buttons.light_glyph_button": {
          "$button_content": "settings_common.arrow_image",
          "size": [ "fill", "100%" ]
        }
      }
    ]
  },

  "option_text_edit_control_with_text_button": {
    "type": "stack_panel",
    "orientation": "horizontal",
    "$option_text_edit_control_with_button_size|default": [ "100%", "30px" ],
    "size": "$option_text_edit_control_with_button_size",
    "controls": [
      {
        "text_box@common.text_edit_box": {
          "$option_text_edit_control_size|default": [ "85%", "100%" ],
          "size": "$option_text_edit_control_size",
          "max_length": "$max_text_edit_length",
          "$text_edit_box_content_binding_name": "$option_binding_name",
          "$text_edit_box_binding_collection_name": "$option_binding_name",
          "$text_edit_box_binding_type": "global",
          "$text_box_enabled_binding_name": "$option_enabled_binding_name",
          "enabled": "$enabled",
          "$place_holder_text": "$option_place_holder_text",

          "$text_box_tts_header": "$option_label",
          "variables": [
            {
              "requires": "(not $option_enabled_binding_name or not $enabled)",
              "$text_box_enabled_binding_name": "#not_data_bound",
              "$text_edit_box_enabled_binding_type": "none"
            }
          ]
        }
      },
      {
        "button@common_buttons.light_text_button": {
          "$pressed_button_name|default": "unset_button_name",
          "$button_text|default": "unset $button_text",
          "$option_button_control_size|default": [ "fill", "100%" ],
          "size": "$option_button_control_size"
        }
      }
    ]
  },

  "option_toggle_state_template": {
    "type": "image",
    "size": [ 30, 16 ],
    "anchor_from": "top_left",
    "anchor_to": "top_left"
  },

  "option_toggle_on@settings_common.option_toggle_state_template": {
    "texture": "textures/ui/toggle_on"
  },

  "option_toggle_off@settings_common.option_toggle_state_template": {
    "texture": "textures/ui/toggle_off"
  },

  "option_toggle_on_hover@settings_common.option_toggle_state_template": {
    "texture": "textures/ui/toggle_on_hover"
  },

  "option_toggle_off_hover@settings_common.option_toggle_state_template": {
    "texture": "textures/ui/toggle_off_hover"
  },

  "option_toggle_on_locked@settings_common.option_toggle_on": {
    "alpha": 0.5
  },

  "option_toggle_off_locked@settings_common.option_toggle_off": {
    "alpha": 0.5
  },

  "option_toggle_control@common.toggle": {
    "layer": 2,
    "$toggle_state_binding_name|default": "$option_binding_name",
    "$toggle_enabled_binding_name|default": "$option_enabled_binding_name",
    "$toggle_enabled_binding_type|default": "global",
    "size": [ "100%", "100%c" ],
    "$binding_type": "global",
    "$binding_condition": "once",
    "$unchecked_control": "settings_common.option_toggle_off",
    "$checked_control": "settings_common.option_toggle_on",
    "$unchecked_hover_control": "settings_common.option_toggle_off_hover",
    "$checked_hover_control": "settings_common.option_toggle_on_hover",
    "$unchecked_locked_control": "settings_common.option_toggle_off_locked",
    "$unchecked_locked_hover_control": "settings_common.option_toggle_off_locked",
    "$checked_locked_control": "settings_common.option_toggle_on_locked",
    "$checked_locked_hover_control": "settings_common.option_toggle_on_locked",

    "$enable_directional_toggling": false,

    "enabled": "$enabled",
    "variables": [
      {
        "requires": "(not $option_enabled_binding_name or not $enabled)",
        "$toggle_enabled_binding_name": "#not_data_bound",
        "$toggle_enabled_binding_type": "none"
      }
    ]
  },

  "checkbox_visuals_unchecked@checkbox_visuals": {
    "$checkbox_texture": "textures/ui/checkbox_space"
  },

  "checkbox_visuals_checked@checkbox_visuals": {
    "$checkbox_texture": "textures/ui/checkbox_check",
    "$selected": true
  },

  "checkbox_visuals_unchecked_locked@checkbox_visuals": {
    "$checkbox_texture": "textures/ui/checkbox_spaceDisabled",
    "$alpha": 0.5
  },

  "checkbox_visuals_checked_locked@checkbox_visuals": {
    "$checkbox_texture": "textures/ui/checkbox_checkDisabled",
    "$alpha": 0.5,
    "$selected": true
  },

  "checkbox_visuals_unchecked_hover@checkbox_visuals": {
    "$checkbox_texture": "textures/ui/checkbox_spaceHover",
    "$hovered": true
  },

  "checkbox_visuals_checked_hover@checkbox_visuals": {
    "$checkbox_texture": "textures/ui/checkbox_checkHover",
    "$hovered": true
  },

  "checkbox_visuals": {
    "type": "panel",
    "$alpha|default": 1.0,
    "$checkbox_label_bindings|default": [],
    "$checkbox_label_color|default": "$main_header_text_color",
    "$checkbox_label_font_type|default": "default",
    "$no_label|default": false,
    "$selected|default": false,
    "$hovered|default": false,
    "variables": [
      {
        "requires": "$selected",
        "$highlight_image": "textures/ui/dropDownSelectBG"
      },
      {
        "requires": "$hovered",
        "$highlight_image": "textures/ui/dropDownHoverBG"
      }
    ],
    "controls": [
      {
        "checkbox_image": {
          "type": "image",
          "texture": "$checkbox_texture",
          "alpha": "$alpha",
          "anchor_from": "left_middle",
          "anchor_to": "left_middle",
          "size": [ 10, 10 ],
          "offset": [ 5, 0 ],
          "layer": 2
        }
      },
      {
        "checkbox_label": {
          "ignored": "($no_label)",
          "type": "label",
          "anchor_from": "left_middle",
          "anchor_to": "left_middle",
          "text": "$checkbox_label_text",
          "font_type": "$checkbox_label_font_type",
          "color": "$checkbox_label_color",
          "offset": [ 21, 0 ],
          "size": [ "100% - 21px", "default" ],
          "alpha": "$alpha",
          "bindings": "$checkbox_label_bindings",
          "layer": 2
        }
      },
      {
        "accessibility_selection_highlight": {
          "type": "image",
          "$selection_highlight_size|default": [ "100%-2px", "100%-2px" ],
          "size": "$selection_highlight_size",
          "$selection_highlight_offset|default": [ 0, 0 ],
          "offset": "$selection_highlight_offset",
          "ignored": "(not $selected and not $hovered)",
          "$highlight_image|default": "",
          "texture": "$highlight_image",
          "tiled": true,
          "layer": 1
        }
      }
    ]
  },

  "checkbox_with_highlight_and_label@common.toggle": {
    // don't forget to implement "$toggle_name" and "$checkbox_label_text" when extending this control
    "$unchecked_control|default": "settings_common.checkbox_visuals_unchecked",
    "$checked_control|default": "settings_common.checkbox_visuals_checked",
    "$unchecked_hover_control|default": "settings_common.checkbox_visuals_unchecked_hover",
    "$checked_hover_control|default": "settings_common.checkbox_visuals_checked_hover",
    "$unchecked_locked_control|default": "settings_common.checkbox_visuals_unchecked_locked",
    "$unchecked_locked_hover_control|default": "settings_common.checkbox_visuals_unchecked_locked",
    "$checked_locked_control|default": "settings_common.checkbox_visuals_checked_locked",
    "$checked_locked_hover_control|default": "settings_common.checkbox_visuals_checked_locked"
  },

  "radio_visuals_unchecked@radio_visuals": {
    "$radio_texture": "textures/ui/radio_off"
  },

  "radio_visuals_checked@radio_visuals": {
    "$radio_texture": "textures/ui/radio_on",
    "$selected": true
  },

  "radio_visuals_unchecked_locked@radio_visuals": {
    "$radio_texture": "textures/ui/radio_off",
    "$alpha": 0.5
  },

  "radio_visuals_checked_locked@radio_visuals": {
    "$radio_texture": "textures/ui/radio_on",
    "$alpha": 0.5,
    "$selected": true
  },

  "radio_visuals_unchecked_hover@radio_visuals": {
    "$radio_texture": "textures/ui/radio_off_hover",
    "$hovered": true
  },

  "radio_visuals_checked_hover@radio_visuals": {
    "$radio_texture": "textures/ui/radio_on_hover",
    "$hovered": true
  },

  "radio_visuals": {
    "type": "panel",
    "size": [ "100%", 16 ],
    "$alpha|default": 1.0,
    "$radio_label_bindings|default": [],
    "$radio_label_color|default": "$main_header_text_color",
    "$radio_label_font_type|default": "default",
    "$no_label|default": false,
    "$selected|default": false,
    "$hovered|default": false,
    "variables": [
      {
        "requires": "$selected",
        "$highlight_image": "textures/ui/dropDownSelectBG"
      },
      {
        "requires": "$hovered",
        "$highlight_image": "textures/ui/dropDownHoverBG"
      }
    ],
    "controls": [
      {
        "radio_image": {
          "type": "image",
          "texture": "$radio_texture",
          "alpha": "$alpha",
          "anchor_from": "left_middle",
          "anchor_to": "left_middle",
          "size": [ 10, 10 ],
          "layer": 2
        }
      },
      {
        "radio_label": {
          "ignored": "($no_label)",
          "type": "label",
          "anchor_from": "left_middle",
          "anchor_to": "left_middle",
          "text": "$radio_label_text",
          "font_type": "$radio_label_font_type",
          "color": "$radio_label_color",
          "offset": [ 16, 0.5 ],
          "size": [ "100% - 16px", "default" ],
          "alpha": "$alpha",
          "bindings": "$radio_label_bindings",
          "layer": 2,
          "$tts_override_control_value|default": "$radio_label_text",
          "tts_override_control_value": "$tts_override_control_value"
        }
      },
      {
        "accessibility_selection_highlight": {
          "type": "image",
          "$selection_highlight_size|default": [ "100% + 4px", "100% + 2px" ],
          "size": "$selection_highlight_size",
          "$selection_highlight_offset|default": [ 0, 0 ],
          "offset": "$selection_highlight_offset",
          "ignored": "(not $selected and not $hovered)",
          "$highlight_image|default": "",
          "texture": "$highlight_image",
          "tiled": true,
          "layer": 1
        }
      }
    ]
  },

  "radio_with_label_core@common.radio_toggle": {
    "$unchecked_control|default": "settings_common.radio_visuals_unchecked",
    "$checked_control|default": "settings_common.radio_visuals_checked",
    "$unchecked_hover_control|default": "settings_common.radio_visuals_unchecked_hover",
    "$checked_hover_control|default": "settings_common.radio_visuals_checked_hover",
    "$unchecked_locked_control|default": "settings_common.radio_visuals_unchecked_locked",
    "$unchecked_locked_hover_control|default": "settings_common.radio_visuals_unchecked_locked",
    "$checked_locked_control|default": "settings_common.radio_visuals_checked_locked",
    "$checked_locked_hover_control|default": "settings_common.radio_visuals_checked_locked",
    "$radio_toggle_group": true,
    "size": [ "100%", "100%c" ],
    "$toggle_name|default": "$toggle_state_binding_name",
    "$toggle_enabled_binding_name": "$option_enabled_binding_name",

    "enabled": "$enabled",
    "$toggle_enabled_binding_type": "global",
    "variables": [
      {
        "requires": "(not $option_enabled_binding_name or not $enabled)",
        "$toggle_enabled_binding_name": "#not_data_bound",
        "$toggle_enabled_binding_type": "none"
      }
    ]
  },

  "option_radio_group_control": {
    "type": "stack_panel",
    "size": [ "100%", "100%c" ],
    "controls": "$radio_buttons",
    /* Here's an example of how $radio_buttons should be defined:
    "$radio_buttons": [
      {
        "@settings_common.radio_with_label": {
          "$toggle_state_binding_name": "#game_mode_radio_survival",
          "$radio_label_text": "realmsSettingsScreen.survivalRadioButton",
        }
      },
      {
        "@settings_common.radio_with_label": {
          "$toggle_state_binding_name": "#game_mode_radio_creative",
          "$radio_label_text": "realmsSettingsScreen.creativeRadioButton",
        }
      }
    ]
    */
    "$radio_factory|default": { "name": "empty" },
    "$radio_collection_name|default": "",
    "$radio_bindings|default": [],

    "factory": "$radio_factory",
    "collection_name": "$radio_collection_name",
    "bindings": "$radio_bindings"
  },

  "radio_with_label": {
    "type": "panel",
    "anchor_from": "top_left",
    "anchor_to": "top_left",
    "size": [ "100%", "17px" ],
    "offset": [ 3, 0 ],
    "$enabled|default": true,
    "controls": [
      { "radio_with_label_core@settings_common.radio_with_label_core": {} }
    ]
  },

  "radio_with_label_and_icon": {
    "type": "panel",
    "anchor_from": "top_left",
    "anchor_to": "top_left",
    "size": [ "100%", "17px" ],
    "offset": [ 3, 0 ],
    "$enabled|default": true,
    "$icon_texture": "",
    "$icon_texture_bindings|default": [],
    "controls": [
      { "radio_with_label_core@settings_common.radio_with_label_core": {} },
      {
        "radio_with_label_icon": {
          "type": "image",
          "anchor_from": "right_middle",
          "anchor_to": "right_middle",
          "texture": "$icon_texture",
          "size": [ 8, 8 ],
          "offset": [ -8, 0 ],
          "layer": 100,
          "bindings": "$icon_texture_bindings"
        }
      }
    ]
  },

  "radio_with_label_and_content_unchecked@settings_common.radio_with_label_and_content": {
    "$radio_texture": "textures/ui/radio_off"
  },

  "radio_with_label_and_content_checked@settings_common.radio_with_label_and_content": {
    "$radio_background_color": "$radio_background_checked_color",
    "$radio_texture": "textures/ui/radio_on"
  },

  "radio_with_label_and_content_unchecked_locked@settings_common.radio_with_label_and_content": {
    "$radio_texture": "textures/ui/radio_off",
    "$alpha": 0.5
  },

  "radio_with_label_and_content_checked_locked@settings_common.radio_with_label_and_content": {
    "$radio_background_color": "$radio_background_checked_color",
    "$radio_texture": "textures/ui/radio_on",
    "$alpha": 0.5
  },

  "radio_with_label_and_content_unchecked_hover@settings_common.radio_with_label_and_content": {
    "$radio_background_color": "$radio_background_hover_color",
    "$radio_texture": "textures/ui/radio_off_hover"
  },

  "radio_with_label_and_content_checked_hover@settings_common.radio_with_label_and_content": {
    "$radio_background_color": "$radio_background_hover_color",
    "$radio_texture": "textures/ui/radio_on_hover"
  },

  "radio_with_label_and_content_stack_item": {
    "type": "panel",
    "$radio_stack_item_element_size|default": [ "100%c", 19 ],
    "size": "$radio_stack_item_element_size"
  },

  "radio_with_label_and_content": {
    "type": "panel",
    "size": [ "100%", "100%cm" ],
    "$radio_background_color|default": "$radio_background_unchecked_color",
    "controls": [
      {
        "radio_background": {
          "type": "image",
          "texture": "textures/ui/White",
          "keep_ratio": false,
          "size": [ "100% - 4px", "100%sm" ],
          "color": "$radio_background_color",
          "layer": 1
        }
      },
      {
        "radio_item_with_description_stack": {
          "type": "stack_panel",
          "orientation": "vertical",
          "size": [ "100%", "100%c + 4px" ],

          "layer": 2,
          "$no_description|default": true,
          "controls": [
            {
              "radio_icon_and_label@settings_common.radio_item_with_label_and_content_stack": {}
            },
            {
              "radio_description@settings_common.radio_description_panel": {}
            }
          ]
        }
      }
    ]
  },

  "radio_item_with_label_and_content_stack": {
    "type": "stack_panel",
    "orientation": "horizontal",
    "size": [ "100%", "100%cm" ],
    "layer": 1,
    "$alpha|default": 1.0,
    "$radio_label_bindings|default": [],
    "$radio_label_color|default": "$main_header_text_color",
    "$radio_label_font_type|default": "default",
    "$no_radio_content|default": true,
    "$no_label|default": false,
    "controls": [
      {
        "initial_padding@common.empty_panel": {
          "size": [ 5, "100%sm" ]
        }
      },
      {
        "radio_image_panel@settings_common.radio_with_label_and_content_stack_item": {
          "controls": [
            {
              "image": {
                "type": "image",
                "texture": "$radio_texture",
                "alpha": "$alpha",
                "size": [ 10, 10 ]
              }
            }
          ]
        }
      },
      {
        "radio_to_content_padding@common.empty_panel": {
          "size": [ 5, "100%sm" ]
        }
      },
      {
        "radio_content_panel@settings_common.radio_with_label_and_content_stack_item": {
          "ignored": "$no_radio_content",
          "controls": [
            { "radio_image@$radio_content_control": {} }
          ]
        }
      },
      {
        "content_to_label_padding@common.empty_panel": {
          "ignored": "$no_radio_content",
          "size": [ 5, "100%sm" ]
        }
      },
      {
        "radio_label_panel@settings_common.radio_with_label_and_content_stack_item": {
          "controls": [
            {
              "radio_label": {
                "ignored": "($no_label)",
                "type": "label",
                "shadow": true,
                "text": "$radio_label_text",
                "font_type": "$radio_label_font_type",
                "color": "$radio_label_color",
                "size": [ "default", "default" ],
                "alpha": "$alpha",
                "bindings": "$radio_label_bindings"
              }
            }
          ]
        }
      }
    ]
  },

  "radio_description_panel": {
    "ignored": "($no_description)",
    "type": "panel",
    "size": [ "100%", "100%c" ],
    "layer": 1,
    "$description_font_type": "smooth",
    "$description_font_scale_factor": 1.333,
    "controls": [
      {
        "description@settings_common.radio_description": {}
      }
    ]
  },

  "radio_description": {
    "type": "label",
    "color": "$main_header_text_color",
    "size": [ "100% - 10px", "default" ],
    "text": "$radio_label_desc",
    "font_type": "$description_font_type",
    "font_scale_factor": "$description_font_scale_factor",
    "shadow": false,
    "offset": [ 4, 2 ]
  },

  "radio_item_with_label_and_content": {
    "$radio_background_unchecked_color": "$dropdown_radio_background_unchecked_color",
    "$radio_background_checked_color": "$dropdown_radio_background_checked_color",
    "$radio_background_hover_color": "$dropdown_radio_background_hover_color",

    "$checked_control": "settings_common.radio_with_label_and_content_checked",
    "$unchecked_control": "settings_common.radio_with_label_and_content_unchecked",
    "$checked_hover_control": "settings_common.radio_with_label_and_content_checked_hover",
    "$unchecked_hover_control": "settings_common.radio_with_label_and_content_unchecked_hover",
    "$checked_locked_control": "settings_common.radio_with_label_and_content_checked_locked",
    "$unchecked_locked_control": "settings_common.radio_with_label_and_content_unchecked_locked",
    "$checked_locked_hover_control": "settings_common.radio_with_label_and_content_checked_locked",
    "$unchecked_locked_hover_control": "settings_common.radio_with_label_and_content_unchecked_locked",

    "type": "panel",
    "anchor_from": "top_left",
    "anchor_to": "top_left",
    "size": [ "100%", "100%cm" ],
    "controls": [
      { "radio_with_label_core@settings_common.radio_with_label_core": {} }
    ]
  },

  "option_slider_control": {
    "type": "panel",
    "size": [ "100% - 2px", 16 ],
    "controls": [
      {
        "slider@common.slider": {
          "size": [ "100%-8px", 10 ],
          "$slider_box_size": [ 10, 16 ],
          "offset": [ 1, 0 ],

          "$option_label|default": "",

          "$slider_tts_header": "$option_label",
          "$slider_tts_header_binding_type": "global",

          "enabled": "$enabled",
          "$slider_enabled_binding_name": "$option_enabled_binding_name",
          "$slider_enabled_binding_type": "global",
          "variables": [
            {
              "requires": "(not $option_enabled_binding_name or not $enabled)",
              "$slider_enabled_binding_name": "#not_data_bound",
              "$slider_enabled_binding_type": "none"
            }
          ]
        }
      }
    ]
  },

  "default_options_dropdown_toggle_button_state_content": {
    "type": "stack_panel",
    // new_button_state has a layer of 2
    "layer": 3,
    "orientation": "horizontal",
    "$options_dropdown_toggle_button_state_content|default": [ "100%", "100% - 8px" ],
    "size": "$options_dropdown_toggle_button_state_content",
    "$options_dropdown_toggle_prelabel_content|default": "common.empty_panel",
    "$options_dropdown_toggle_left_padding|default": [ 8, "100%" ],
    "$options_dropdown_toggle_right_padding|default": [ 8, "100%" ],
    "controls": [
      {
        "left_padding@common.empty_panel": {
          "size": "$options_dropdown_toggle_left_padding"
        }
      },
      {
        "option_content@$options_dropdown_toggle_prelabel_content": {
          "$options_dropdown_toggle_prelabel_content_size|default": [ 0, "100%" ],
          "size": "$options_dropdown_toggle_prelabel_content_size"
        }
      },
      {
        "option_content_padding@common.empty_panel": {
          "$options_dropdown_toggle_prelabel_content_padding|default": [ 0, "100%" ],
          "size": "$options_dropdown_toggle_prelabel_content_padding"
        }
      },
      {
        "label_panel": {
          "type": "panel",
          "layer": 1,
          "size": [ "fill", "100%" ],
          "controls": [
            {
              "label@common.new_button_label": {
                "layer": 1,
                "$options_dropdown_label_color_binding_type|default": "none",
                "$options_dropdown_label_color_binding|default": "",
                "$options_dropdown_toggle_label_font_type|default": "default",
                "$options_dropdown_toggle_label_font_scale|default": 1.0,
                "anchor_from": "left_middle",
                "anchor_to": "left_middle",
                "size": [ "100%", "default" ],
                "max_size": [ "100%", "100%" ],
                "text": "$options_dropdown_toggle_label_binding",
                "font_type": "$options_dropdown_toggle_label_font_type",
                "font_scale_factor": "$options_dropdown_toggle_label_font_scale",
                "$options_dropdown_toggle_label_shadow|default": false,
                "shadow": "$options_dropdown_toggle_label_shadow",
                "alpha": "$content_alpha",
                "$tts_override_control_value|default": "$options_dropdown_toggle_label_binding",
                "tts_override_control_value": "$tts_override_control_value",

                "$options_dropdown_toggle_label_binding_type|default": "global",
                "$options_dropdown_toggle_label_binding_collection_name|default": "",
                "$options_dropdown_label_bindings|default": [
                  {
                    "binding_name": "$options_dropdown_toggle_label_binding",
                    "binding_condition": "none",
                    "binding_type": "$options_dropdown_toggle_label_binding_type",
                    "binding_collection_name": "$options_dropdown_toggle_label_binding_collection_name"
                  },
                  {
                    "binding_name": "$options_dropdown_label_color_binding",
                    "binding_type": "$options_dropdown_label_color_binding_type",
                    "binding_name_override": "#color"
                  },
                  {
                    "binding_name": "$tts_override_control_value",
                    "binding_condition": "none",
                    "binding_type": "$options_dropdown_toggle_label_binding_type",
                    "binding_collection_name": "$options_dropdown_toggle_label_binding_collection_name"
                  }
                ],

                "bindings": "$options_dropdown_label_bindings"
              }
            }
          ]
        }
      },
      {
        "arrow_panel": {
          "type": "panel",
          "layer": 1,
          "size": [ "100%c", "100%" ],
          "controls": [
            {
              "dropdown_chevron_image": {
                "$alpha|default": 1.0,
                "type": "image",
                "layer": 1,
                "texture": "$default_chevron",
                "size": [ 8, 8 ],
                "alpha": "$alpha"
              }
            }
          ]
        }
      },
      {
        "right_padding@common.empty_panel": {
          "size": "$options_dropdown_toggle_right_padding"
        }
      }
    ]
  },

  "options_dropdown_toggle_control@common_toggles.light_template_toggle": {
    "size": [ "100%", "100%" ],
    "$button_type_panel|default": "settings_common.default_options_dropdown_toggle_button_state_content",
    "$unchecked_hover_control": "common_toggles.toggle_unchecked_hover_with_chevron",
    "$checked_hover_control": "common_toggles.toggle_checked_hover_with_chevron",

    "enabled": "$enabled",
    "$toggle_enabled_binding_name|default": "$option_enabled_binding_name",
    "$toggle_enabled_binding_type|default": "global",
    "$toggle_binding_type|default": "global",
    "variables": [
      {
        "requires": "(not $option_enabled_binding_name or not $enabled)",
        "$toggle_enabled_binding_name": "#not_data_bound",
        "$toggle_enabled_binding_type": "none"
      }
    ]
  },

  "options_dropdown_dark_toggle_control@common_toggles.dark_template_toggle": {
    "size": [ "100%", "100%" ],
    "$button_type_panel|default": "settings_common.default_options_dropdown_toggle_button_state_content",
    "$unchecked_hover_control": "common_toggles.toggle_unchecked_hover_with_chevron",
    "$checked_hover_control": "common_toggles.toggle_checked_hover_with_chevron",

    "enabled": "$enabled",
    "$toggle_enabled_binding_name|default": "$option_enabled_binding_name",
    "$toggle_enabled_binding_type|default": "global",
    "$toggle_binding_type|default": "global",
    "variables": [
      {
        "requires": "(not $option_enabled_binding_name or not $enabled)",
        "$toggle_enabled_binding_name": "#not_data_bound",
        "$toggle_enabled_binding_type": "none"
      }
    ]
  },

  "option_dropdown_control": {
    "type": "panel",
    "$option_dropdown_size|default": [ "100%", 30 ],
    "size": "$option_dropdown_size",
    "anchor_from": "center",
    "anchor_to": "center",
    "$dropdown_background_control|default": "common.dropdown_background",
    "$option_dropdown_type|default": "common.dropdown",
    "$option_label|default": "",
    "layer": 2,
    "controls": [
      {
        "dropdown@$option_dropdown_type": {
          "$dropdown_toggle": "settings_common.options_dropdown_toggle_control",
          "$dropdown_background": "$dropdown_background_control",
          // you need to specify the content with "$dropdown_content"
          "$dropdown_content|default": "unset_dropdown_content",
          // you need to specify a unique name with "$dropdown_name"
          "$dropdown_name|default": "unset $dropdown_name",
          // you need to specify a the label with "$options_dropdown_toggle_label_binding"
          "$options_dropdown_toggle_label_binding|default": "unset $options_dropdown_toggle_label_text",
          "$locked_alpha": 0.5,
          "$toggle_tts_header": "$option_label"
        }
      }
    ]
  },

  "option_dropdown_control_no_scroll@settings_common.option_dropdown_control": {
    "$option_dropdown_type": "common.dropdown_no_scrollpanel"
  },

  "option_info_label_with_icon": {
    "type": "image",
    "texture": "textures/ui/text_label_box",
    "size": [ "100%", "100%c + 6px" ],
    "$used_fontsize|default": "normal",
    "$used_fonttype|default": "default",
    "controls": [
      {
        "control": {
          "type": "label",
          "color": "$main_header_text_color",
          "size": [ "100% - 8px", "default" ],
          "layer": 1,
          "text": "$container_text_binding_name",
          "font_size": "$used_fontsize",
          "font_type": "$used_fonttype",
          "tts_override_control_value": "$container_tts_binding_name",
          "bindings": [
            {
              "binding_name": "$container_text_binding_name"
            },
            {
              "binding_name": "$container_tts_binding_name"
            }
          ]
        }
      },
      {
        "icon_panel": {
          "type": "stack_panel",
          "orientation": "horizontal",
          "size": [ "100%c", "100%c" ],
          "anchor_to": "right_middle",
          "anchor_from": "right_middle",
          "controls": [
            {
              "icon_image": {
                "type": "image",
                "size": [ 8, 8 ],
                "texture": "$container_icon_binding_name",
                "bindings": [
                  {
                    "binding_name": "$container_icon_binding_name",
                    "binding_name_override": "#texture"
                  }
                ]
              }
            },
            {
              "padding2@common.empty_panel": {
                "size": [ 8, 0 ]
              }
            }
          ]
        }
      }
    ]
  },

  "option_info_label_icon@common.tts_label_focus_wrapper": {
    "$tts_label_panel": "settings_common.option_info_label_with_icon"
  },

  "option_icon_label@settings_common.option_generic": {
    "$control_name": "settings_common.option_info_label_icon"
  },

  "option_info_label_with_bulb": {
    "type": "image",
    "texture": "textures/ui/text_label_box",
    "size": [ "100%", "100%c + 6px" ],
    "$used_fontsize|default": "normal",
    "$used_fonttype|default": "default",
    "$second_info_panel_visible|default": false,
    "$container_text_secondary_binding_name|default": "",
    "controls": [
      {
        "stack_panel": {
          "type": "stack_panel",
          "size": [ "100%", "100%cm" ],
          "orientation": "horizontal",
          "controls": [
            {
              "padding1@common.empty_panel": {
                "size": [ 2, 19 ]
              }
            },
            {
              "bulb_panel": {
                "type": "stack_panel",
                "orientation": "vertical",
                "size": [ "100%c", "100%sm" ],
                "controls": [
                  {
                    "padding1@common.empty_panel": {
                      "size": [ 0, "fill" ]
                    }
                  },
                  {
                    "bulb_image": {
                      "type": "image",
                      "size": [ 15, 19 ],
                      "bilinear": true,
                      "texture": "textures/ui/infobulb",
                      "layer": 1
                    }
                  },
                  {
                    "padding2@common.empty_panel": {
                      "size": [ 0, "fill" ]
                    }
                  }
                ]
              }
            },
            {
              "padding2@common.empty_panel": {
                "size": [ 2, 0 ]
              }
            },
            {
              "label_panel": {
                "type": "stack_panel",
                "size": [ "fill", "100%c" ],
                "orientation": "vertical",
                "controls": [
                  {
                    "info_label1": {
                      "type": "label",
                      "color": "$main_header_text_color",
                      "size": [ "100% - 2px", "default" ],
                      "layer": 1,
                      "text": "$container_text_binding_name",
                      "font_size": "$used_fontsize",
                      "font_type": "$used_fonttype",
                      "bindings": [
                        {
                          "binding_name": "$container_text_binding_name"
                        }
                      ]
                    }
                  },
                  {
                    "padding2@common.empty_panel": {
                      "size": [ 0, 8 ]
                    }
                  },
                  {
                    "info_label2": {
                      "type": "label",
                      "color": "$main_header_text_color",
                      "size": [ "100% - 2px", "default" ],
                      "layer": 1,
                      "text": "$container_text_secondary_binding_name",
                      "font_size": "$used_fontsize",
                      "font_type": "$used_fonttype",
                      "visible": "$second_info_panel_visible",
                      "bindings": [
                        {
                          "binding_name": "$container_text_secondary_binding_name"
                        }
                      ]
                    }
                  }
                ]
              }
            },
            {
              "padding3@common.empty_panel": {
                "size": [ 0, 8 ]
              }
            }
          ]
        }
      }
    ]
  },

  "option_info_label_with_image": {
    "type": "image",
    "texture": "textures/ui/text_label_box",
    "size": [ "100%", "100%c + 6px" ],
    "$used_fontsize|default": "normal",
    "$used_fonttype|default": "default",
    "controls": [
      {
        "control": {
          "type": "label",
          "color": "$main_header_text_color",
          "size": [ "100% - 8px", "default" ],
          "layer": 1,
          "text": "$container_text_binding_name",
          "font_size": "$used_fontsize",
          "font_type": "$used_fonttype",
          "bindings": [
            {
              "binding_name": "$container_text_binding_name"
            }
          ]
        }
      }
    ]
  },

  "option_info_label_image@common.tts_label_focus_wrapper": {
    "$tts_label_panel": "settings_common.option_info_label_with_image"
  },

  "option_toggle@settings_common.option_generic": {
    "$control_name": "settings_common.option_toggle_control",
    "$option_label|default": "",
    "$toggle_tts_header": "$option_label",
    "variables": [
      {
        "requires": "$desktop_screen",
        "$one_line_layout": true
      }
    ]
  },

  "option_radio_group@settings_common.option_generic": {
    "$control_name": "settings_common.option_radio_group_control"
  },

  "option_inline_radio_group_control": {
    "type": "stack_panel",
    "orientation": "horizontal",
    "size": [ "100%", 17 ],
    "controls": "$radio_buttons"
  },

  "option_inline_radio_group@settings_common.option_generic": {
    "$control_name": "settings_common.option_inline_radio_group_control"
  },

  "option_radio_dropdown_group": {
    "type": "panel",
    "size": [ "100% - 4px", "100%c + 4px" ],
    "offset": [ 2, 1 ],
    "$toggle_tts_header": "",
    "$toggle_tts_name": "accessibility.dropdown.listItem",
    "$toggle_tts_toggle_on_text": "accessibility.state.selected",
    "$toggle_tts_toggle_off_text": "accessibility.state.unselected",
    "$toggle_tts_type_priority": 50,

    "controls": [
      {
        "radio_control_group@settings_common.option_radio_group_control": {
          "anchor_from": "top_left",
          "anchor_to": "top_left"
        }
      }
    ]
  },

  "option_text_edit@settings_common.option_generic": {
    "$option_place_holder_text|default": "",
    "$max_text_edit_length|default": 30,
    "$control_name": "settings_common.option_text_edit_control"
  },

  "option_text_edit_with_button@settings_common.option_generic": {
    "$option_place_holder_text|default": "",
    "$max_text_edit_length|default": 30,
    "$control_name": "settings_common.option_text_edit_control_with_button"
  },

  "option_text_edit_with_text_button@settings_common.option_generic": {
    "$option_place_holder_text|default": "",
    "$max_text_edit_length|default": 30,
    "$control_name": "settings_common.option_text_edit_control_with_text_button"
  },

  "option_slider@settings_common.option_generic": {
    "$control_name": "settings_common.option_slider_control"
  },

  "option_dropdown@settings_common.option_generic": {
    "$control_name": "settings_common.option_dropdown_control"
  },


  "option_dropdown_no_scroll@settings_common.option_generic": {
    "$control_name": "settings_common.option_dropdown_control_no_scroll"
  },

  "option_custom_control@settings_common.option_generic": {
    // user must set $control_name
  },

  "option_info_label@settings_common.option_generic": {
    "$control_name": "settings_common.option_info_label_image"
  },

  "dynamic_dialog_screen@common.base_screen": {
    "type": "screen",
    "cache_screen": true,

    "button_mappings": [
      {
        "from_button_id": "button.menu_cancel",
        "to_button_id": "button.menu_exit",
        "mapping_type": "global"
      },
      {
        "from_button_id": "button.menu_tab_left",
        "to_button_id": "button.menu_tab_left",
        "mapping_type": "global",
        "scope": "view"
      },
      {
        "from_button_id": "button.menu_tab_right",
        "to_button_id": "button.menu_tab_right",
        "mapping_type": "global",
        "scope": "view"
      }
    ],
    "variables": [
      {
        "requires": "($is_realm_slot or $realm_no_world_edit)",
        "$screen_background_control": "realms_slots.realms_background"
      }
    ],
    "$screen_content": "settings_common.settings_content",
    "$header_safezone_control": "common_store.store_top_bar_filler",
    "$header_bar_control": "common_store.store_top_bar",
    "$is_full_screen_layout": true
  },

  "dynamic_dialog_fullscreen@common.base_screen": {
    "type": "screen",
    "cache_screen": true,
    // tab navigation button mappings removed to prevent switching screens while in fullscreen
    "button_mappings": [
      {
        "from_button_id": "button.menu_cancel",
        "to_button_id": "button.menu_exit",
        "mapping_type": "global"
      }
    ],
    "variables": [
      {
        "requires": "($is_realm_slot or $realm_no_world_edit)",
        "$screen_background_control": "realms_slots.realms_background"
      }
    ],
    "$screen_content": "settings_common.settings_content",
    "$header_safezone_control": "common_store.store_top_bar_filler",
    "$header_bar_control": "common_store.store_top_bar",
    "$is_full_screen_layout": true
  },

  "settings_content": {
    "type": "panel",
    "controls": [
      // Adding fill background color for all settings.
      {
        "background": {
          "$layer|default": -1,
          "variables": [
            {
              "requires": "($is_realm_slot or $realm_no_world_edit)",
              "$layer": -2
            }
          ],
          "type": "image",
          "texture": "textures/ui/White",
          "keep_ratio": false,
          "size": [ "100%", "100%sm" ],
          "color": [ 0.192, 0.196, 0.2 ], // First test: [0.239, 0.204, 0.204]
          "offset": [ 0, 0 ],
          "layer": "$layer",
          "anchor_from": "top_left",
          "anchor_to": "top_left"
        }
      },

      {
        "stack_panel": {
          "type": "stack_panel",
          "size": [ "100%", "100%" ],
          "controls": [
            {
              "content_panel": {
                "type": "panel",
                "size": [ "100%", "fill" ],

                "controls": [
                  {
                    "common_panel@common.fullscreen_header": {
                      "$dialog_background": "dialog_background_hollow_3"
                    }
                  },
                  {
                    "container": {
                      "type": "panel",
                      "size": [ "100%", "100% - 4px" ],
                      "controls": [
                        { "$dialog_content@$dialog_content": {} }
                      ]
                    }
                  }
                ]
              }
            }
          ]
        }
      },
      {
        "popup_dialog_factory": {
          "type": "factory",
          "control_ids": {
            "purchase_failed": "@realms_create.popup_dialog__purchase_failed",
            "purchase_in_progress": "@realms_create.popup_dialog__purchase_in_progress",
            "backups_modal": "@realms_settings.popup_dialog__backups",
            "save_options_modal": "@realms_settings.popup_dialog__save_options",
            "sign_out_fail": "@general_section.sign_out_fail_popup",
            "edu_onedrive_error": "@general_section.edu_cloud_onedrive_error_popup",
            "realms_storage_free_up_space": "@realms_settings.popup_dialog__free_up_space"
          }
        }
      }
    ]
  },

  "toggle_button_control": {
    "type": "panel",
    "$glyph_offset|default": [ 5, 0 ],
    "$glyph_anchor_from|default": "left_middle",
    "$glyph_anchor_to|default": "left_middle",
    "$button_label_offset|default": [ 34, 0 ],
    "layer": 2,
    "controls": [
      {
        "glyph": {
          "type": "image",
          "anchor_from": "$glyph_anchor_from",
          "anchor_to": "$glyph_anchor_to",
          "offset": "$glyph_offset",
          "texture": "$glyph_texture",
          "size": "$glyph_size",
          "layer": 3,
          "color": "$glyph_color",
          "alpha": "$content_alpha",

          "$glyph_bindings|default": [],
          "bindings": "$glyph_bindings"
        }
      },
      {
        "glyph_color": {
          "type": "image",
          "anchor_from": "$glyph_anchor_from",
          "anchor_to": "$glyph_anchor_to",
          "offset": "$glyph_offset",
          "texture": "$glyph_color_texture",
          "size": "$glyph_size",
          "layer": 4,
          "alpha": "$content_alpha",

          "$glyph_color_bindings|default": [],
          "bindings": "$glyph_color_bindings"
        }
      },
      {
        "progress_loading_bars@progress.progress_loading_bars": {
          "anchor_from": "left_middle",
          "anchor_to": "left_middle",
          "color": "$glyph_color",
          "offset": [ 5, 0 ],
          "layer": 5,
          "size": "$glyph_size",
          "visible": false,
          "$glyph_progress_bindings|default": [],
          "bindings": "$glyph_progress_bindings"
        }
      },
      {
        "tab_button_text": {
          "type": "label",
          "anchor_from": "left_middle",
          "anchor_to": "left_middle",
          "size": [ "100% - 38px", "default" ],
          "max_size": [ "100% - 38px", "100% - 4px" ],
          "offset": "$button_label_offset",
          "text": "$button_text",
          "layer": 3,
          "color": "$text_color",
          "alpha": "$content_alpha",

          "$button_text_binding_type|default": "none",
          "$button_text_grid_collection_name|default": "",
          "$button_text_binding_condition|default": "none",

          "bindings": [
            {
              "binding_type": "$button_text_binding_type",
              "binding_condition": "$button_text_binding_condition",
              "binding_collection_name": "$button_text_grid_collection_name",
              "binding_name": "$button_text",
              "binding_name_override": "$button_text"
            }
          ]
        }
      }
    ]
  },

  "section_toggle_base@common_toggles.light_ui_toggle": {
    "anchor_from": "top_left",
    "anchor_to": "top_left",
    "size": [ "100%", "30px" ],
    "$button_size_override": [ "100%", "100% + 1px" ],
    "$button_type_panel": "settings_common.toggle_button_control",

    "$radio_toggle_group": true,
    "$toggle_name": "navigation_tab",
    "$toggle_group_default_selected": "$default_selector_toggle_index",

    "$toggle_tab_focus_binding_type": "global",
    "$toggle_tab_focus_binding_name": "#navigation_tab_focus_precedence",
    "$toggle_on_hover_binding_type": "global",
    "$toggle_on_hover_binding_name": "#toggle_on_hover",
    "$toggle_tts_toggle_on_text": "accessibility.state.selected",
    "$toggle_tts_toggle_off_text": "accessibility.state.unselected",
    "$toggle_tts_name": "accessibility.tab.tts.title"
  },

  // upper right title
  "section_title_label": {
    "type": "label",
    "anchor_from": "top_middle",
    "anchor_to": "top_middle",
    "layer": 2,
    "color": "$title_text_color",
    "text": "#section_title",
    "text_alignment": "center",
    "bindings": [
      {
        "binding_name": "#section_title"
      }
    ]
  },

  // upper left title
  "dialog_title_label": {
    "type": "label",
    "anchor_from": "top_left",
    "anchor_to": "top_left",
    "layer": 2,
    "color": "$title_text_color",
    "text": "#dialog_title",
    "bindings": [
      {
        "binding_name": "#dialog_title"
      }
    ]
  },

  "dialog_titles": {
    "type": "stack_panel",
    "orientation": "horizontal",
    "anchor_from": "top_left",
    "anchor_to": "top_left",
    "size": [ "100%", 15 ],
    "offset": [ 0, 3.5 ],
    "controls": [
      {
        "left_padding": {
          "type": "panel",
          "size": [ 18, "100%" ]
        }
      },
      {
        "dialog_title_label@settings_common.dialog_title_label": {
          "size": [ "40% - 3px", "100%" ]
        }
      },
      {
        "center_padding": {
          "type": "panel",
          "size": [ 9, "100%" ]
        }
      },
      {
        "section_title_label@settings_common.section_title_label": {
          "size": [ "fill", "100%" ]
        }
      },
      {
        "right_padding_is_always_right": {
          "type": "panel",
          "size": [ 22, "100%" ]
        }
      }
    ]
  },

  "dialog_content": {
    "type": "panel",
    "anchor_from": "top_middle",
    "anchor_to": "top_middle",
    "controls": [
      { "dialog_titles@settings_common.dialog_titles": {} },
      { "selector_area@settings_common.selector_area": {} },
      { "content_area@settings_common.content_area": {} },
      { "section_divider@settings_common.section_divider": {} }
    ]
  },

  "dialog_content_fullscreen": {
    "type": "panel",
    "anchor_from": "top_middle",
    "anchor_to": "top_middle",
    "controls": [
        { "dialog_titles@settings_common.dialog_titles": {} },
        {
            "selector_area@settings_common.selector_area_no_scroll": {
                "size": [ "0px", "100% - 19px" ]
            }
        },
        {
            "content_area@settings_common.content_area": {
                "size": [ "80%", "100% - 19px" ],
                "offset": [ "-10%", "21px" ]
            }
        },
        {
            "section_divider@settings_common.section_divider": {
                "visible": false
            }
        }
    ]
  },

  "selector_group_label": {
    "type": "label",
    "size": [ "100%", "default" ],
    "color": "$main_header_text_color",
    "offset": [ 15, 0 ]
  },

  "scrollable_selector_area_content": {
    "type": "panel",
    "offset": [ "2px", "2px" ],
    "size": [ "100% - 4px", "100%c + 4px" ],
    "controls": [
      { "$selector_stack_panel@$selector_stack_panel": {} }
    ]
  },

  // left side
  "selector_area": {
    "type": "panel",
    "offset": [ 2, "21px" ],
    "size": [ "40% - 3px", "100% - 19px" ],
    "anchor_from": "top_left",
    "anchor_to": "top_left",
    "layer": 2,
    "focus_container": true,
    "use_last_focus": true,
    "$focus_navigation_mode_override_down|default": "contained",
    "$focus_navigation_mode_override_up|default": "contained",
    "$focus_navigation_mode_override_left|default": "",
    "$focus_navigation_mode_override_right|default": "",
    "focus_navigation_mode_down": "$focus_navigation_mode_override_down",
    "focus_navigation_mode_up": "$focus_navigation_mode_override_up",
    "focus_navigation_mode_left": "$focus_navigation_mode_override_left",
    "focus_navigation_mode_right": "$focus_navigation_mode_override_right",
    "controls": [
      {
        "scrolling_panel@common.scrolling_panel": {
          "$scrolling_content": "settings_common.scrollable_selector_area_content",
          "$show_background": false,
          "$scroll_size": [ "5px", "100% - 4px" ],
          "$scroll_bar_left_padding_size": [ 1, 0 ]
        }
      }
    ]
  },

    // left side - no scroll version
    "selector_area_no_scroll": {
        "type": "panel",
        "offset": [ 2, "21px" ],
        "size": [ "40% - 3px", "100% - 19px" ],
        "anchor_from": "top_left",
        "anchor_to": "top_left",
        "layer": 2,
        "focus_container": false,
        "controls": [
            {
                "scrolling_panel@common.scrolling_panel": {
                    "$scrolling_content": "settings_common.scrollable_selector_area_content",
                    "$show_background": false,
                    "$scroll_size": [ "5px", "0px" ],
                    "$scroll_bar_left_padding_size": [ 1, 0 ]
                }
            }
        ]
    },

  // right side
  "content_area": {
    "type": "panel",
    "offset": [ "-1px", "21px" ],
    "size": [ "60% - 8px", "100% - 19px" ],
    "anchor_from": "top_right",
    "anchor_to": "top_right",
    "layer": 1,

    "focus_container": true,
    "use_last_focus": false,
    "$focus_navigation_mode_override_down|default": "contained",
    "$focus_navigation_mode_override_up|default": "contained",
    "$focus_navigation_mode_override_left|default": "",
    "$focus_navigation_mode_override_right|default": "",
    "focus_navigation_mode_down": "$focus_navigation_mode_override_down",
    "focus_navigation_mode_up": "$focus_navigation_mode_override_up",
    "focus_navigation_mode_left": "$focus_navigation_mode_override_left",
    "focus_navigation_mode_right": "$focus_navigation_mode_override_right",
    "ttsSectionContainer": true,

    "controls": [
      {
        "control": {
          "type": "stack_panel",
          "size": [ "100%", "100%" ],
          "anchor_from": "top_right",
          "anchor_to": "top_right",
          "controls": [
            {
              "header_panel": {
                "type": "panel",
                "layer": 20,
                "size": [ "100%", "100%c" ],
                "anchor_from": "top_left",
                "anchor_to": "top_left",
                "controls": [
                  {
                    "content@$section_header_panels": {}
                  }
                ]
              }
            },
            {
              "scrolling_panel@common.scrolling_panel": {
                "size": [ "100%", "fill" ],
                "$scrolling_content": "$section_content_panels",
                "$show_background": false,
                "$scroll_size": [ "5px", "100% - 4px" ],
                "$scroll_bar_left_padding_size": [ 1, 0 ]
              }
            },
            {
              "footer_panel": {
                "type": "panel",
                "layer": 20,
                "size": [ "100%", "100%c" ],
                "anchor_from": "bottom_left",
                "anchor_to": "bottom_left",
                "controls": [
                  {
                    "content@$section_footer_panels": {}
                  }
                ]
              }
            }
          ]
        }
      }
    ]
  },

  // divider between two sides
  "section_divider": {
    "type": "image",
    "offset": [ "40%", "20px" ],
    "size": [ "4px", "100% - 18px" ],
    "anchor_from": "top_left",
    "anchor_to": "top_left",
    "layer": 3,
    "texture": "textures/ui/HowToPlayDivider"
  },

  "screen_base@settings_common.dynamic_dialog_screen": {
    "$dialog_content": "settings_common.dialog_content"
  },

  "screen_base_fullscreen@settings_common.dynamic_dialog_fullscreen": {
    "$dialog_content": "settings_common.dialog_content_fullscreen"
  }
}
