{
  "namespace": "non_xbl_user_management",
  
  "black_tint_image": {
    "type": "image",
    "texture": "textures/ui/Black",
    "layer": 1
  },

  "modal_title_text": {
    "type": "label",
    "$title_text_offset|default": [ 9, 9 ],
    "offset": "$title_text_offset",
    "size": [ "90%", 15 ],
    "$title_text_anchor|default": "top_left",
    "$title_text_alignment|default": "left",
    "anchor_to": "$title_text_anchor",
    "anchor_from": "$title_text_anchor",
    "text_alignment": "$title_text_alignment",
    "layer": 1,
    "text": "#modal_title_text",
    "color": "$title_text_color",
    "shadow": false,
    "bindings": [
      {
        "binding_name": "#modal_title_text"
      }
    ]    
  },

  "modal_label_text": {
    "type": "stack_panel",
    "size": [ "100% - 4px", "100%c" ],
    "anchor_to": "top_middle",
    "anchor_from": "top_middle",
    "offset": [ 2, 0 ],
    "controls": [
      {
        "padding": {
          "type": "panel",
          "layer": 2,
          "size": [ 0, 2 ]
        }
      },
      {
        "text": {
          "type": "label",
          "size": [ "100%", "default" ],
          "anchor_to": "top_middle",
          "anchor_from": "top_middle",
          "layer": 2,
          "text": "#modal_label_text",
          "color": "$body_text_color",
          "font_type": "smooth",
          "shadow": true,
          "bindings": [
            {
              "binding_name": "#modal_label_text"
            }
          ]    
        }
      }
    ]
  },

  "modal_label_panel@common.scrolling_panel": {
    "$scrolling_pane_size": [ "100% - 1px", "100% - 3px" ],
    "$scrolling_pane_offset": [ 2, 0 ],
    "$scrolling_content": "non_xbl_user_management.modal_label_text",
    "$scroll_size": [ 5, "100% - 4px" ],
    "$show_background": false,
    "layer": 1,
    "offset": [ 0, 23 ],
    "anchor_from": "top_middle",
    "anchor_to": "top_middle"
  },

  "modal_left_button@common_buttons.light_text_button": {
    "anchor_to": "top_middle",
    "anchor_from": "top_middle",
    "size": [ "100%", "50%-1px" ],
    "$pressed_button_name": "$popup_dialog_left_button_name",
    "$button_text": "#modal_left_button_text",
    "bindings": [
      {
        "binding_name": "#modal_left_button_text"
      }
    ]    
  },

  "modal_middle_button@common_buttons.light_text_button": {
    "anchor_to": "center",
    "anchor_from": "center",
    "size": [ "100%", "50%-1px" ],
    "$pressed_button_name": "$popup_dialog_middle_button_name",
    "$button_text": "#modal_middle_button_text",
    "bindings": [
      {
        "binding_name": "#modal_middle_button_text"
      }
    ]    
  },

  "modal_rightcancel_button@common_buttons.light_text_button": {
    "anchor_to": "bottom_middle",
    "anchor_from": "bottom_middle",
    "size": [ "100%", "50%-1px" ],
    "$pressed_button_name": "$popup_dialog_rightcancel_button_name",
    "$button_text": "#modal_rightcancel_button_text",
    "bindings": [
      {
        "binding_name": "#modal_rightcancel_button_text"
      }
    ]    
  },

  "three_buttons_panel": {
    "type": "panel",
    "anchor_to": "bottom_middle",
    "anchor_from": "bottom_middle",
    "size": [ "100%-14px", 90 ],
    "offset": [ 0, -7 ],
    "$left_button_focus_precedence|default": 0,
    "$right_button_focus_precedence|default": 1,
    "controls": [
      {
        "left@non_xbl_user_management.modal_left_button": {
          "size": [ "100%", "33% - 1px" ],
          "default_focus_precedence": "$left_button_focus_precedence"
        }
      },
      {
        "middle@non_xbl_user_management.modal_middle_button": {
          "size": [ "100%", "33% - 1px" ]
        }
      },
      {
        "right@non_xbl_user_management.modal_rightcancel_button": {
          "size": [ "100%", "33% - 1px" ],
          "default_focus_precedence": "$right_button_focus_precedence"
        }
      }
    ]
  },

  "two_buttons_panel": {
    "type": "panel",
    "anchor_to": "bottom_middle",
    "anchor_from": "bottom_middle",
    "size": [ "100%-14px", 64 ],
    "offset": [ 0, -7 ],
    "$left_button_focus_precedence|default": 0,
    "$right_button_focus_precedence|default": 1,
    "controls": [
      { 
        "left@non_xbl_user_management.modal_left_button": { 
          "default_focus_precedence": "$left_button_focus_precedence"
        } 
      },
      {
        "right@non_xbl_user_management.modal_rightcancel_button": {
          "default_focus_precedence": "$right_button_focus_precedence"
        }
      }
    ]
  },

  "single_button_panel": {
    "type": "panel",
    "anchor_to": "bottom_middle",
    "anchor_from": "bottom_middle",
    "size": [ "100%-14px", 30 ],
    "offset": [ 0, -7 ],
    "controls": [
      { "left@non_xbl_user_management.modal_middle_button": { "size": [ "100%", "100%" ] } }
    ]
  },

  "modal_dialog_with_buttons": {
    "type": "panel",
    "anchor_to": "center",
    "anchor_from": "center",
    "size": "$modal_screen_size",
    "controls": [
      {
        "background_with_buttons@common.common_panel": {
          "$dialog_background": "$dialog_background_override",
          "$show_close_button": false,
          "$fill_alpha": 1
        }
      },
      { "title@non_xbl_user_management.modal_title_text": {} },
      {
        "text_with_buttons@non_xbl_user_management.modal_label_panel": {
          "size": "$modal_panel_label_size"
        }
      },
      {
        "button_panel@$button_panel": {}
      }
    ]
  },

  "modal_input_panel@common.input_panel": {
    "$popup_dialog_escape_button_name|default": "user_confirm_dialog.escape",
    "$popup_dialog_left_button_name|default": "user_confirm_dialog.left_button",
    "$popup_dialog_middle_button_name|default": "user_confirm_dialog.middle_button",
    "$popup_dialog_rightcancel_button_name|default": "user_confirm_dialog.rightcancel_button",
    "button_mappings": [
      {
        "from_button_id": "button.menu_select",
        "to_button_id": "button.menu_select",
        "mapping_type": "pressed"
      },
      {
        "from_button_id": "button.menu_secondary_select",
        "to_button_id": "button.menu_secondary_select",
        "mapping_type": "pressed"
      },
      {
        "from_button_id": "button.menu_ok",
        "to_button_id": "button.menu_ok",
        "mapping_type": "pressed"
      },
      {
        "from_button_id": "button.menu_cancel",
        "to_button_id": "$popup_dialog_escape_button_name",
        "mapping_type": "global"
      },
      {
        "from_button_id": "button.menu_up",
        "to_button_id": "button.menu_up",
        "mapping_type": "global",
        "scope": "view"
      },
      {
        "from_button_id": "button.menu_down",
        "to_button_id": "button.menu_down",
        "mapping_type": "global",
        "scope": "view"
      }
    ],
    "controls": [
      {
        "black_tint_image@non_xbl_user_management.black_tint_image": {
          "ignored": "$is_holographic",
          "alpha": 0.5
        }
      }
    ]
  },

  "user_confirm_dialog_screen_content": {
    "type": "panel",
    "$button_text_binding_type": "global",
    "$button_text_max_size": [ "100%", "100%" ],    
    "$modal_screen_size|default": [ 204, 140 ],
    "$title_text_anchor": "top_middle",
    "$title_text_alignment": "center",
    "$title_text_offset": [0, 9],
    "variables": [
      {
        "requires": "($modal_dialog_popup_size = small)",
        "$modal_screen_size": [ 204, 110 ]
      },
      {
        "requires": "($modal_dialog_popup_size = medium)",
        "$modal_screen_size": [ 204, 140 ]
      },
      {
        "requires": "($modal_dialog_popup_size = large)",
        "$modal_screen_size": [ 290, 180 ]
      },
      {
        "requires": "$two_buttons_visible",
        "$dialog_background_override": "dialog_background_hollow_1",
        "$button_panel": "non_xbl_user_management.two_buttons_panel",
        "$modal_panel_label_size": ["100% - 16px", "100% - 96px"]
      },
      {
        "requires": "$single_button_visible",
        "$dialog_background_override": "dialog_background_hollow_2",
        "$button_panel": "non_xbl_user_management.single_button_panel",
        "$modal_panel_label_size": ["100% - 16px", "100% - 62px"]
      },
      {
        "requires": "$no_buttons_visible",
        "$dialog_background_override": "dialog_background_hollow_3",
        "$button_panel": "common.empty_panel",
        "$modal_panel_label_size": [ "100% - 16px", "100% - 28px" ]
      }
    ],
    "controls": [
      {
        "modal_input@non_xbl_user_management.modal_input_panel": {
          "controls": [
            {
              "modal_bg_buttons@non_xbl_user_management.modal_dialog_with_buttons": {}
            }
          ]
        }
      }
    ]
  },

  "user_confirm_dialog_screen@common.base_screen": {
    "$screen_content": "non_xbl_user_management.user_confirm_dialog_screen_content"
  }   
}
