/********************************************************
+*   (c) Mojang. All rights reserved                       *
+*   (c) Microsoft. All rights reserved.                   *
+*********************************************************/

{
  "namespace": "invite",

  //Black bordered box is used for the grid item and around the gamerpic
  "black_border": {
    "type": "image",
    "texture": "textures/ui/mainbanners"
  },

  "black_border_hover@invite.black_border": {
    "texture": "textures/ui/MainBannersHover"
  },

  "platform_icon": {
    "ignored": "(not $invite_platform_icons_visible)",
    "type": "image",
    "texture": "textures/ui/platform_icon"
  },

  "grey_borderless_locked@invite.black_border": {
    "texture": "textures/ui/disabledButtonNoBorder"
  },

  //locked image boxes
  "checked_locked_image@common.checkbox_image": {
    "texture": "textures/ui/checkbox_check_locked"
  },

  "unchecked_locked_image@common.checkbox_image": {
    "texture": "textures/ui/checkbox_space_locked"
  },

  "left_arrow_image": {
    "type": "image",
    "texture": "textures/ui/arrow_l_default",
    "size": [ 7, 9 ]
  },

  "right_arrow_image": {
    "type": "image",
    "texture": "textures/ui/arrow_r_default",
    "size": [ 7, 9 ]
  },

  "account_link_image": {
    "type": "image",
    "texture": "textures/ui/control"
  },

  "panel_text": {
    "type": "label",
    "color": "$dark_grid_item_text_color",
    "shadow": false,
    "layer": 5,
    "anchor_from": "top_left",
    "anchor_to": "top_left"
  },

  "loading_friends@invite.panel_text": {
    "text": "realmsInvitationScreen.loadingFriends",
    "size": [ "100%", 20 ],
    "font_size": "normal",
    "anchor_from": "center",
    "anchor_to": "center",
    "bindings": [
      {
        "binding_name": "#is_loading",
        "binding_name_override": "#visible",
        "binding_type": "global"
      }
    ]
  },

  "account_link_icon": {
    "type": "stack_panel",
    "orientation": "horizontal",
    "size": [ "100%", "100%" ],
    "controls": [
      {
        "space_01": {
          "type": "panel",
          "size": [ 9, "21%" ]
        }
      },
      {
        "account_link_image@invite.account_link_image": {
          "size": [ 2, "100%" ]
        }
      },
      {
        "space_03": {
          "type": "panel",
          "size": [ 9, "100%" ]
        }
      }
    ]
  },

  //Gamerpic uses the black border and an image that will come from XBL
  "gamerpic": {
    "type": "custom",
    "renderer": "profile_image_renderer",
    "bindings": [
      {
        "binding_name": "#profile_image_options",
        "binding_type": "collection",
        "binding_collection_name": "$collection_name"
      }
    ]
  },

  "third_party_profile_pic": {
    "type": "image",
    "bindings": [
      {
        "binding_name": "#third_party_profile_pic",
        "binding_name_override": "#texture",
        "binding_type": "collection",
        "binding_collection_name": "$collection_name"
      },
      {
        "binding_name": "#third_party_profile_pic_file_system",
        "binding_name_override": "#texture_file_system",
        "binding_type": "collection",
        "binding_collection_name": "$collection_name"
      }
    ]
  },

  "gamerpic_panel": {
    "type": "panel",
    "size": [ 20, 20 ],
    "anchor_to": "left_middle",
    "anchor_from": "left_middle",
    "offset": [ 20, 0 ],
    "controls": [
      { "black_border@invite.black_border": {
        "layer": 1
        } 
      },
      {
        "gamerpic@invite.gamerpic": {
          "layer": 1,
          "size": [ "100%-2px", "100%-2px" ]
        }
      },
      {
        "online_indication_positioner": {
          "type": "panel",
          "size": [ "100%", "100%" ],
          "controls": [
            {
              "indicator_images@invite.online_indicator": {
                "layer": 2,
                "anchor_to": "top_right",
                "anchor_from": "top_right",
                 // Use to Adjust the offset for Online Icon
                "$indicator_offset": [ 0, 0 ]
              }
            }
          ]
        }
      }
    ]
  },

  "third_party_profile_pic_panel": {
    "type": "panel",
    "size": [ 20, 20 ],
    "anchor_to": "left_middle",
    "anchor_from": "left_middle",
    "offset": [ 20, 0 ],
    "controls": [
      { "black_border@invite.black_border": {} },
      {
        "third_party_profile_pic@invite.third_party_profile_pic": {
          "layer": 1,
          "size": [ "100%-2px", "100%-2px" ]
        }
      }
    ]
  },

  "platform_icon_panel": {
    "type": "panel",
    "size": [ 15, 15 ],
    "anchor_to": "right_middle",
    "anchor_from": "right_middle",
    "offset": "$icon_offset",
    "$icon_offset|default": [ -24, 0 ],
    "$is_platform_icon|default": false,
    "visible": "$is_platform_icon",
    "controls": [
      {
        "platform_icon@invite.platform_icon": {
          "layer": 1,
          "size": [ "100%-2px", "100%-2px" ]
        }
      }
    ]
  },

  //Status image - 2 images with flipped visibility
  "status_image": {
    "type": "image",
    "size": [ 8, 8 ]
  },

  "online_image@invite.status_image": {
    "texture": "textures/ui/online",
    "bindings": [
      {
        "binding_name": "#online_visible",
        "binding_name_override": "#visible",
        "binding_type": "collection",
        "binding_collection_name": "$collection_name"
      }
    ]
  },

  "offline_image@invite.status_image": {
    "texture": "textures/ui/offline",
    "bindings": [
      {
        "binding_name": "#offline_visible",
        "binding_name_override": "#visible",
        "binding_type": "collection",
        "binding_collection_name": "$collection_name"
      }
    ]
  },

  "online_indicator": {
    "type": "panel",
    "anchor_to": "right_middle",
    "anchor_from": "right_middle",
    "offset": "$indicator_offset",
    "$indicator_offset|default": [ -6, 0 ],
    "size": [ 6, 6 ],
    "controls": [
      {
        "online_image@invite.online_image": {}
      }
    ]
  },

  //The selected indicator - a check box - 4 images for checked/hover
  "checkbox_panel": {
    "type": "panel",
    "size": [ "100%c", "100%c" ],
    "anchor_to": "left_middle",
    "anchor_from": "left_middle",
    "layer": 2
  },

  "checked_panel@invite.checkbox_panel": {
    "$image_offset|default": [ 6, 0 ],
    "controls": [
      {
        "checked_image@common.checked_image": {
          "offset": "$image_offset"
        }
      }
    ]
  },

  "unchecked_panel@invite.checkbox_panel": {
    "$image_offset|default": [ 6, 0 ],
    "controls": [
      {
        "unchecked_image@common.unchecked_image": {
          "offset": "$image_offset"
        }
      }
    ]
  },

  "checked_locked_panel@invite.checkbox_panel": {
    "$image_offset|default": [ 6, 0 ],
    "controls": [
      {
        "checked_image@invite.checked_locked_image": {
          "offset": "$image_offset"
        }
      }
    ]
  },

  "unchecked_locked_panel@invite.checkbox_panel": {
    "$image_offset|default": [ 6, 0 ],
    "controls": [
      {
        "unchecked_image@invite.unchecked_locked_image": {
          "offset": "$image_offset"
        }
      }
    ]
  },

  "checked_hover_panel@invite.checkbox_panel": {
    "$image_offset|default": [ 6, 0 ],
    "controls": [
      {
        "checked_hover_image@common.checked_hover_image": {
          "offset": "$image_offset"
        }
      }
    ]
  },

  "unchecked_hover_panel@invite.checkbox_panel": {
    "$image_offset|default": [ 6, 0 ],
    "controls": [
      {
        "unchecked_hover_image@common.unchecked_hover_image": {
          "offset": "$image_offset"
        }
      }
    ]
  },



  //labels that indicate the information about the game
  //Since there's no flow panel we use the color switch codes to build up the string from multiple inputs
  "friend_label": {
    "type": "label",
    "color": "$body_text_color",
    "locked_color": "$light_button_default_text_color",
    "size": [ "100%-60px", "50%" ]
  },

  "friend_grid_xbl_gamertag@invite.friend_label": {
    "anchor_to": "top_left",
    "anchor_from": "top_left",
    "text": "#xbl_gamertag",
    "offset": [ 42, 5 ],
    "bindings": [
      {
        "binding_name": "#xbl_gamertag",
        "binding_type": "collection",
        "binding_collection_name": "$collection_name"
      }
    ]
  },

  "friend_grid_current_game_label@invite.friend_label": {
    "anchor_to": "bottom_left",
    "anchor_from": "bottom_left",
    "offset": [ 42, 0 ],
    "text": "#current_game_label",
    "bindings": [
      {
        "binding_name": "#current_game_label",
        "binding_type": "collection",
        "binding_collection_name": "$collection_name"
      }
    ]
  },

  "friend_grid_third_party_tag@invite.friend_label": {
    "anchor_to": "top_left",
    "anchor_from": "top_left",
    "offset": [ 42, 5 ],
    "text": "#third_party_tag",
    "bindings": [
      {
        "binding_name": "#third_party_tag",
        "binding_type": "collection",
        "binding_collection_name": "$collection_name"
      }
    ]
  },

  "friend_background@invite.black_border": {
    "size": [ "100%-2px", "100%-2px" ]
  },

  "friend_background_hover@invite.black_border_hover": {
    "size": [ "100%-2px", "100%-2px" ]
  },

  "friend_background_borderless@invite.grey_borderless_locked": {
    "size": [ "100%-2px", "100%-2px" ]
  },

  "hover_friend_button": {
    "type": "panel",
    "controls": [
      { "friend_button_layout@invite.friend_button_layout": {} },
      {
        "hover_text@common.hover_text": {
          "layer": 30,
          "bindings": [
            {
              "binding_name": "#hover_text",
              "binding_type": "collection",
              "binding_collection_name": "$collection_name"
            }
          ]
        }
      }
    ]
  },

  "linked_hover_friend_button": {
    "type": "panel",
    "controls": [
      {
        "hover_text@common.hover_text": {
          "layer": 30,
          "bindings": [
            {
              "binding_name": "#hover_text",
              "binding_type": "collection",
              "binding_collection_name": "$collection_name"
            }
          ]
        }
      }
    ]
  },

  "msa_friend_button_layout": {
    "type": "stack_panel",
    "orientation": "horizontal",
    "size": [ "100%", "100% - 6px" ], //3px padding at top and bottom
    "layer": 1, //Without this the background disappeared on certain layout changes.
    "controls": [
      {
        "spacer01": {
          "type": "panel",
          "size": [ 20, "100%" ]
        }
      },
      {
        "platform_icon_spacer": {
          "type": "panel",
          "size": [ 19, "100%" ],
          "ignored": "(not $is_ps4 or not $is_inviting_to_realm)"
        }
      },
      {
        "spacer_02": {
          "type": "panel",
          "size": [ 23, "100%" ]
        }
      },
      {
        "friend_grid_label_layout": {
          "type": "stack_panel",
          "orientation": "vertical",
          "anchor_to": "center",
          "anchor_from": "center",
          "size": [ "fill", "100%" ],
          "controls": [
            {
              "spacer_01": {
                "type": "panel",
                "size": [ "100%", 3 ]
              }
            },
            {
              "friend_grid_xbl_gamertag@invite.friend_grid_xbl_gamertag": {
                "layer": 1
              }
            },
            {
              "friend_grid_current_game_label@invite.friend_grid_current_game_label": {
                "layer": 1
              }
            }
          ]
        }
      }
    ]
  },

  "platform_friend_button_layout": {
    "type": "stack_panel",
    "orientation": "horizontal",
    "size": [ "100%", "100% - 6px" ], //3px padding at top and bottom
    "layer": 1, //Without this the background disappeared on certain layout changes.
    "controls": [
      {
        "spacer01": {
          "type": "panel",
          "size": [ 20, "100%" ]
        }
      },
      {
        "platform_icon_spacer": {
          "type": "panel",
          "size": [ 19, "100%" ],
          "ignored": "(not $is_ps4 or not $is_inviting_to_realm)"
        }
      },
      {
        "third_party_pic_panel_positioner": {
          "type": "panel",
          "size": [ 20, "100%" ],
          "controls": [
            {
              "pp@invite.third_party_profile_pic_panel": {
                "layer": 1,
                "offset": [ 0, 0 ],
                "anchor_to": "center",
                "anchor_from": "center"
              }
            }
          ]
        }
      },
      {
        "spacer_02": {
          "type": "panel",
          "size": [ 3, "100%" ]
        }
      },
      {
        "friend_grid_label_layout": {
          "type": "stack_panel",
          "orientation": "vertical",
          "size": [ "fill", "100%" ],
          "controls": [
            {
              "spacer_01": {
                "type": "panel",
                "size": [ "100%", 3 ]
              }
            },
            {
              "friend_grid_third_party_tag@invite.friend_grid_third_party_tag": {
                "layer": 1
              }
            },
            {
              "friend_grid_current_game_label@invite.friend_grid_current_game_label": {
                "layer": 1
              }
            }
          ]
        }
      },
      {
        "platform_icon_positioner": {
          "type": "panel",
          "size": [ 15, "100%" ],
          "controls": [
            {
              "platform_icon@invite.platform_icon_panel": {
                "layer": 1,
                "$icon_offset": [ -10, 4 ],
                "anchor_to": "top_left",
                "anchor_from": "top_left"
              }
            }
          ]
        }
      },
      {
        "online_indication_positioner": {
          "type": "panel",
          "size": [ 10, "100%" ],
          "controls": [
            {
              "indicator_images@invite.online_indicator": {
                "layer": 1,
                "anchor_to": "top_left",
                "anchor_from": "top_left",
                "$indicator_offset": [ -8, 8 ]
              }
            }
          ]
        }
      }
    ]
  },

  "linked_friend_button_layout": {
    "type": "stack_panel",
    "orientation": "horizontal",
    "size": [ "100%", "100%" ],
    "layer": 1, //Without this the background disappeared on certain layout changes.
    "controls": [
      {
        "spacer01": {
          "type": "panel",
          "size": [ 6, "100%" ]
        }
      },
      {
        "platform_icon_positioner": {
          "type": "panel",
          "size": [ 15, "100%" ],
          "controls": [
            {
              "platform_icon@invite.platform_icon_panel": {
                "layer": 1,
                "$icon_offset": [ 0, 4 ],
                "anchor_to": "top_left",
                "anchor_from": "top_left"
              }
            }
          ]
        }
      },
      {
        "spacer02": {
          "type": "panel",
          "size": [ 5, "100%" ]
        }
      },
      {
        "platform_profile_pictures": {
          "type": "stack_panel",
          "orientation": "vertical",
          "size": [ 20, "100%" ],
          "anchor_to": "center",
          "anchor_from": "center",
          "offset": [ 0, 2 ],
          "controls": [
            {
              "spacer_01": {
                "type": "panel",
                "size": [ "100%", 3 ]
              }
            },
            {
              "pp2@invite.third_party_profile_pic_panel": {
                "size": [ "100%", "fill" ],
                "layer": 1
              }
            },
            {
              "account_link@invite.account_link_icon": {
                "size": [ "100%", "10%" ]
              }
            },
            {
              "pp1@invite.gamerpic_panel": {
                "size": [ "100%", "fill" ],
                "layer": 1
              }
            },
            {
              "spacer_03": {
                "type": "panel",
                "size": [ "100%", 3 ]
              }
            }
          ]
        }
      },
      {
        "spacer03": {
          "type": "panel",
          "size": [ 3, "100%" ]
        }
      },
      {
        "platform_profile_names": {
          "type": "stack_panel",
          "orientation": "vertical",
          "size": [ "fill", "100%" ],
          "controls": [
            {
              "spacer_01": {
                "type": "panel",
                "size": [ "100%", 4 ]
              }
            },
            {
              "friend_grid_third_party_tag@invite.friend_grid_third_party_tag": {
                "size": [ "100%", "25%" ],
                "layer": 1
              }
            },
            {
              "spacer_02": {
                "type": "panel",
                "size": [ "100%", 10 ]
              }
            },
            {
              "friend_grid_xbl_gamertag@invite.friend_grid_xbl_gamertag": {
                "size": [ "100%", "25%" ],
                "layer": 1
              }
            },
            {
              "friend_grid_current_game_label@invite.friend_grid_current_game_label": {
                "size": [ "100%", "fill" ],
                "layer": 1
              }
            }
          ]
        }
      },
      {
        "online_indication_positioner": {
          "type": "panel",
          "size": [ 10, "100%" ],
          "controls": [
            {
              "indicator_images@invite.online_indicator": {
                "layer": 1,
                "anchor_to": "top_left",
                "anchor_from": "top_left",
                "$indicator_offset": [ -14, 4 ]
              }
            }
          ]
        }
      }
    ]
  },

  "template_msa_friend_button_layout": {
    "type": "panel",
    "controls": [
      { "friend_background@invite.friend_background": {} },
      { "friend_button_layout@invite.msa_friend_button_layout": { "layer": 1 } },
      { "unchecked@$check_state_panel": {} }
    ]
  },

  "template_platform_friend_button_layout": {
    "type": "panel",
    "controls": [
      { "friend_background@invite.friend_background": {} },
      { "friend_button_layout@invite.platform_friend_button_layout": { "layer": 1 } },
      { "unchecked@$check_state_panel": {} }
    ]
  },

  "template_linked_friend_button_layout": {
    "type": "panel",
    "controls": [
      { "friend_background@invite.friend_background": {} },
      {
        "horizontal_spacer_panel": {
          "type": "stack_panel",
          "orientation": "horizontal",
          "size": [ "100% - 6px", "100% - 6px" ],
          "controls": [
            {
              "unchecked_locked@$check_state_panel": {
                "$image_offset": [ 3, 6 ]
              }
            },
            {
              "friend_button_layout@invite.linked_friend_button_layout": {
                "layer": 1
              }
            }
          ]
        }
      }
    ]
  },

  "msa_friend_button@common.checkbox": {
    "$pressed_button_name": "button.menu_friend_select",
    "$checkbox_size|default" : [ "100%", "100%" ],
    "size": "$checkbox_size",
    "tts_control_type_order_priority": 100,
    "tts_value_order_priority": 101,

    "$toggle_grid_collection_name": "$collection_name",
    "$toggle_name": "$toggle_invite_name",
    "$toggle_binding_type": "collection",
    "$toggle_state_binding_name": "#toggle_invite_state",

    "controls": [
      {
        "checked@invite.template_msa_friend_button_layout": {
          "$check_state_panel": "invite.checked_panel"
        }
      },
      {
        "unchecked@invite.template_msa_friend_button_layout": {
          "$check_state_panel": "invite.unchecked_panel"
        }
      },
      {
        "checked_hover@invite.template_msa_friend_button_layout": {
          "$check_state_panel": "invite.checked_hover_panel"
        }
      },
      {
        "unchecked_hover@invite.template_msa_friend_button_layout": {
          "$check_state_panel": "invite.unchecked_hover_panel"
        }
      },
      {
        "checked_locked@invite.template_msa_friend_button_layout": {
          "$check_state_panel": "invite.checked_locked_panel"
        }
      },
      {
        "unchecked_locked@invite.template_msa_friend_button_layout": {
          "$check_state_panel": "invite.unchecked_locked_panel"
        }
      },
      {
        "checked_locked_hover@invite.template_msa_friend_button_layout": {
          "$check_state_panel": "invite.checked_locked_panel"
        }
      },
      {
        "unchecked_locked_hover@invite.template_msa_friend_button_layout": {
          "$check_state_panel": "invite.unchecked_locked_panel"
        }
      }
    ],
    "bindings": [
      {
        "binding_name": "#friend_button_focus_override_up",
        "binding_name_override": "#focus_change_up",
        "binding_type": "collection",
        "binding_collection_name": "$collection_name"
      },
      {
        "binding_name": "#friend_button_focus_override_down",
        "binding_name_override": "#focus_change_down",
        "binding_type": "collection",
        "binding_collection_name": "$collection_name"
      },
      {
        "binding_type": "$toggle_binding_type",
        "binding_condition": "$toggle_binding_condition",
        "binding_collection_name": "$toggle_grid_collection_name",
        "binding_name": "$toggle_state_binding_name",
        "binding_name_override": "#toggle_state"
      }
    ]
  },

  "platform_friend_button@common.checkbox": {
    "$pressed_button_name": "button.menu_friend_select",
    "size": [ "100%", "100%" ],
    "tts_control_type_order_priority": 100,
    "tts_value_order_priority": 101,

    "$toggle_grid_collection_name": "$collection_name",
    "$toggle_name": "$toggle_invite_name",
    "$toggle_binding_type": "collection",
    "$toggle_state_binding_name": "#toggle_invite_state",

    "controls": [
      {
        "checked@invite.template_platform_friend_button_layout": {
          "$check_state_panel": "invite.checked_panel"
        }
      },
      {
        "unchecked@invite.template_platform_friend_button_layout": {
          "$check_state_panel": "invite.unchecked_panel"
        }
      },
      {
        "checked_hover@invite.template_platform_friend_button_layout": {
          "$check_state_panel": "invite.checked_hover_panel"
        }
      },
      {
        "unchecked_hover@invite.template_platform_friend_button_layout": {
          "$check_state_panel": "invite.unchecked_hover_panel"
        }
      },
      {
        "checked_locked@invite.template_platform_friend_button_layout": {
          "$check_state_panel": "invite.checked_locked_panel"
        }
      },
      {
        "unchecked_locked@invite.template_platform_friend_button_layout": {
          "$check_state_panel": "invite.unchecked_locked_panel"
        }
      },
      {
        "checked_locked_hover@invite.template_platform_friend_button_layout": {
          "$check_state_panel": "invite.checked_locked_panel"
        }
      },
      {
        "unchecked_locked_hover@invite.template_platform_friend_button_layout": {
          "$check_state_panel": "invite.unchecked_locked_panel"
        }
      }
    ],
    "bindings": [
      {
        "binding_name": "#friend_button_focus_override_up",
        "binding_name_override": "#focus_change_up",
        "binding_type": "collection",
        "binding_collection_name": "$collection_name"
      },
      {
        "binding_name": "#friend_button_focus_override_down",
        "binding_name_override": "#focus_change_down",
        "binding_type": "collection",
        "binding_collection_name": "$collection_name"
      },
      {
        "binding_type": "$toggle_binding_type",
        "binding_condition": "$toggle_binding_condition",
        "binding_collection_name": "$toggle_grid_collection_name",
        "binding_name": "$toggle_state_binding_name",
        "binding_name_override": "#toggle_state"
      }
    ]
  },

  "linked_friend_button@common.checkbox": {
    "$pressed_button_name": "button.menu_friend_select",
    "size": [ "100%", "100%" ],
    "tts_control_type_order_priority": 100,
    "tts_value_order_priority": 101,

    "$toggle_grid_collection_name": "$collection_name",
    "$toggle_name": "$toggle_invite_name",
    "$toggle_binding_type": "collection",
    "$toggle_state_binding_name": "#toggle_invite_state",

    "controls": [
      {
        "checked@invite.template_linked_friend_button_layout": {
          "$check_state_panel": "invite.checked_panel"
        }
      },
      {
        "unchecked@invite.template_linked_friend_button_layout": {
          "$check_state_panel": "invite.unchecked_panel"
        }
      },
      {
        "checked_hover@invite.template_linked_friend_button_layout": {
          "$check_state_panel": "invite.checked_hover_panel"
        }
      },
      {
        "unchecked_hover@invite.template_linked_friend_button_layout": {
          "$check_state_panel": "invite.unchecked_hover_panel"
        }
      },
      {
        "checked_locked@invite.template_linked_friend_button_layout": {
          "$check_state_panel": "invite.checked_locked_panel"
        }
      },
      {
        "unchecked_locked@invite.template_linked_friend_button_layout": {
          "$check_state_panel": "invite.unchecked_locked_panel"
        }
      },
      {
        "checked_locked_hover@invite.template_linked_friend_button_layout": {
          "$check_state_panel": "invite.checked_locked_panel"
        }
      },
      {
        "unchecked_locked_hover@invite.template_linked_friend_button_layout": {
          "$check_state_panel": "invite.unchecked_locked_panel"
        }
      }
    ],
    "bindings": [
      {
        "binding_name": "#friend_button_focus_override_up",
        "binding_name_override": "#focus_change_up",
        "binding_type": "collection",
        "binding_collection_name": "$collection_name"
      },
      {
        "binding_name": "#friend_button_focus_override_down",
        "binding_name_override": "#focus_change_down",
        "binding_type": "collection",
        "binding_collection_name": "$collection_name"
      },
      {
        "binding_type": "$toggle_binding_type",
        "binding_condition": "$toggle_binding_condition",
        "binding_collection_name": "$toggle_grid_collection_name",
        "binding_name": "$toggle_state_binding_name",
        "binding_name_override": "#toggle_state"
      }
    ]
  },


  "msa_friend_grid_item_template": {
    "type": "stack_panel",
    "orientation": "horizontal",
    "size": [ "100% - 7px", 30 ],
    "controls": [
      {
        "friend_button_Panel": {
          "type": "panel",
          "size": [ "fill", "100%" ],
          "controls": [
            {
              "gamerpic_panel_positioner": {
                "type": "panel",
                "size": [ 20, 20 ],
                "anchor_from": "top_left",
                "anchor_to": "top_left",
                "controls": [
                  {
                    "pp@invite.gamerpic_panel": {
                      "layer": 1,
                      "offset": [ 20, 5 ],
                      "anchor_to": "center",
                      "anchor_from": "center"
                    }
                  }
                ]
              }
            },
            {
              "friend_button@invite.msa_friend_button": {
              "$checkbox_size": [ "100%", "100%" ]
              }
            }
          ]
        }
      },
      {
        "profile_button_pannel": {
          "type": "panel",
          "size": [ 50, "100%"],
          "ignored": "(not $xbox_one)",
          "controls": [
            {
              "view_profile_button@invite.profile_button": {
              "offset": [ 2, 0 ],
              "$button_size": [ "100%", "100%-4px" ]
              }
            }
          ]
        }
      }, 
      {
        "spacer_03": {
          "type": "panel", 
          "size": [ 3, "100%" ]
        }
      }
    ]
  },

  "platform_friend_grid_item_template": {
    "type": "panel",
    "size": [ "100% - 7px", 30 ],
    "controls": [
      {
        "friend_button@invite.platform_friend_button": {}
      }
    ]
  },

  "friend_linked_account_grid_item_template": {
    "type": "panel",
    "size": [ "100% - 7px", 56 ],
    "controls": [
      {
        "friend_button@invite.linked_friend_button": {}
      }
    ]
  },

  "online_xbox_live_friend_grid_item@invite.msa_friend_grid_item_template": {
    "bindings": [
      {
        "binding_name": "#cross_platform_enabled",
        "binding_name_override": "#enabled"
      }
    ]
  },

  "offline_xbox_live_friend_grid_item@invite.msa_friend_grid_item_template": {
    "bindings": [
      {
        "binding_name": "#cross_platform_enabled",
        "binding_name_override": "#enabled"
      }
    ]
  },

  "online_linked_account_friend_grid_item@invite.friend_linked_account_grid_item_template": {
    "type": "panel",
    "$is_platform_icon": "$invite_platform_icons_visible",

    "bindings": [
      {
        "binding_name": "#cross_platform_enabled",
        "binding_name_override": "#enabled"
      }
    ]
  },

  "offline_linked_account_friend_grid_item@invite.friend_linked_account_grid_item_template": {
    "type": "panel",
    "$is_platform_icon": "$invite_platform_icons_visible",

    "bindings": [
      {
        "binding_name": "#cross_platform_enabled",
        "binding_name_override": "#enabled"
      }
    ]
  },

  "online_platform_friend_grid_item@invite.platform_friend_grid_item_template": {
    "type": "panel",
    "$is_platform_icon": "$invite_platform_icons_visible"
  },

  "offline_platform_friend_grid_item@invite.platform_friend_grid_item_template": {
    "type": "panel",
    "$is_platform_icon": "$invite_platform_icons_visible"
  },

  "online_xbox_live_friend_list_grid": {
    "type": "grid",
    "grid_item_template": "online_xbox_live_friend_grid_item",
    "grid_dimension_binding": "#online_xbox_live_friend_grid_dimension",
    "collection_name": "$collection_name",
    "$toggle_invite_name": "toggle_xbox_live_invite_online",
    "anchor_to": "top_left",
    "anchor_from": "top_left",
    "layer": 2,
    "size": [ "100%", "default" ],
    "offset": [ 3, 0 ],
    "bindings": [
      {
        "binding_name": "#online_xbox_live_friend_grid_dimension"
      }
    ]
  },

  "offline_xbox_live_friend_list_grid": {
    "type": "grid",
    "grid_item_template": "offline_xbox_live_friend_grid_item",
    "grid_dimension_binding": "#offline_xbox_live_friend_grid_dimension",
    "collection_name": "$collection_name",
    "$toggle_invite_name": "toggle_xbox_live_invite_offline",
    "anchor_to": "top_left",
    "anchor_from": "top_left",
    "layer": 2,
    "size": [ "100%", "default" ],
    "offset": [ 3, 0 ],
    "bindings": [
      {
        "binding_name": "#offline_xbox_live_friend_grid_dimension"
      }
    ]
  },

  "online_platform_friend_list_grid": {
    "type": "grid",
    "grid_item_template": "online_platform_friend_grid_item",
    "grid_dimension_binding": "#online_platform_friend_grid_dimension",
    "collection_name": "$collection_name",
    "$toggle_invite_name": "toggle_platform_invite_online",
    "anchor_to": "top_left",
    "anchor_from": "top_left",
    "layer": 2,
    "size": [ "100%", "default" ],
    "offset": [ 3, 0 ],
    "bindings": [
      {
        "binding_name": "#online_platform_friend_grid_dimension"
      }
    ]
  },

  "offline_platform_friend_list_grid": {
    "type": "grid",
    "grid_item_template": "offline_platform_friend_grid_item",
    "grid_dimension_binding": "#offline_platform_friend_grid_dimension",
    "collection_name": "$collection_name",
    "$toggle_invite_name": "toggle_platform_invite_offline",
    "anchor_to": "top_left",
    "anchor_from": "top_left",
    "layer": 2,
    "size": [ "100%", "default" ],
    "offset": [ 3, 0 ],
    "bindings": [
      {
        "binding_name": "#offline_platform_friend_grid_dimension"
      }
    ]
  },

  "online_linked_account_friend_list_grid": {
    "type": "grid",
    "grid_item_template": "online_linked_account_friend_grid_item",
    "grid_dimension_binding": "#online_linked_account_friend_grid_dimension",
    "collection_name": "$collection_name",
    "$toggle_invite_name": "toggle_linked_account_invite_online",
    "anchor_to": "top_left",
    "anchor_from": "top_left",
    "layer": 2,
    "size": [ "100%", "default" ],
    "offset": [ 3, 0 ],
    "bindings": [
      {
        "binding_name": "#online_linked_account_friend_grid_dimension"
      }
    ]
  },

  "offline_linked_account_friend_list_grid": {
    "type": "grid",
    "grid_item_template": "offline_linked_account_friend_grid_item",
    "grid_dimension_binding": "#offline_linked_account_friend_grid_dimension",
    "collection_name": "$collection_name",
    "$toggle_invite_name": "toggle_linked_account_invite_offline",
    "anchor_to": "top_left",
    "anchor_from": "top_left",
    "layer": 2,
    "size": [ "100%", "default" ],
    "offset": [ 3, 0 ],
    "bindings": [
      {
        "binding_name": "#offline_linked_account_friend_grid_dimension"
      }
    ]
  },

  "friends_pagination_controls": {
    "type": "stack_panel",
    "orientation": "horizontal",
    "$button_size|default": [ "100%y", "100%" ],
    "size": [ "100% - 7px", 30 ],
    "controls": [
      {
        "previous_button@common_buttons.light_glyph_button": {
          "$pressed_button_name": "button.previous_friends_page",
          "$button_content": "invite.left_arrow_image",
          "size": "$button_size",
          "focus_identifier": "$button_focus_identifier",
          "$button_bindings": [
            {
              "binding_type": "collection_details",
              "binding_collection_name": "$collection_name"
            },
            {
              "binding_name": "#previous_button_enabled",
              "binding_type": "collection",
              "binding_name_override": "#enabled",
              "binding_collection_name": "$collection_name"
            }
          ]
        }
      },
      {
        "center_panel": {
          "type": "panel",
          "size": [ "fill", "100%" ],
          "controls": [
            {
              "page_counter": {
                "type": "label",
                "anchor_from": "center",
                "anchor_to": "center",
                "color": "$body_text_color",
                "text": "#page_counter_label",
                "bindings": [
                  {
                    "binding_name": "#page_counter_label",
                    "binding_type": "collection",
                    "binding_collection_name": "$collection_name"
                  }
                ]
              }
            }
          ]
        }
      },
      {
        "next_button@common_buttons.light_content_button": {
          "$pressed_button_name": "button.next_friends_page",
          "$button_content": "invite.right_arrow_image",
          "size": "$button_size",
          "focus_identifier": "$button_focus_identifier",
          "$button_bindings": [
            {
              "binding_type": "collection_details",
              "binding_collection_name": "$collection_name"
            },
            {
              "binding_name": "#next_button_enabled",
              "binding_type": "collection",
              "binding_name_override": "#enabled",
              "binding_collection_name": "$collection_name"
            }
          ]
        }
      }
    ]
  },

  "friends_category": {
    "type": "stack_panel",
    "orientation": "vertical",
    "size": [ "100%", "100%c" ],
    "controls": [
      {
        "friends_grid@$friends_category_grid_type": {}
      },
      {
        "pagination_stack_panel": {
          "ignored": "(not $use_pagination)",
          "type": "stack_panel",
          "orientation": "vertical",
          "size": [ "100%", "100%c" ],
          "controls": [
            {
              "padding_1": {
                "type": "panel",
                "size": [ "100%", 4 ]
              }
            },
            {
              "pagination_controls@invite.friends_pagination_controls": {}
            },
            {
              "padding_2": {
                "type": "panel",
                "size": [ "100%", 4 ]
              }
            },
            {
              "divider@common.horizontal_divider": {
                "size": [ "100% - 7px", "100%c" ]
              }
            }
          ],
          "bindings": [
            {
              "binding_name": "#friends_pagination_visible",
              "binding_name_override": "#visible",
              "binding_type": "collection",
              "binding_collection_name": "$collection_name"
            }
          ]
        }
      },
      {
        "padding": {
          "type": "panel",
          "size": [ "100%", 4 ]
        }
      }
    ],
    "bindings": [
      {
        "binding_name": "$visibility_binding",
        "binding_name_override": "#visible"
      }
    ]
  },

  "frame_label@invite.label": {
    "type": "label",
    "anchor_from": "top_left",
    "anchor_to": "top_left",
    "size": [ "default", 10 ],
    "offset": [ 1, 2 ],
    "layer": 3,
    "color": "$body_text_color"
  },

  "friend_panel": {
    "type": "panel",
    "size": [ "100%", "100%" ]
  },

  "scrolling_content_stack": {
    "type": "stack_panel",
    "anchor_from": "top_left",
    "anchor_to": "top_left",
    "size": [ "100% + 6px", "100%c + 1px" ],
    "controls": [
      {
        "invite_party_panel@invite.invite_party_panel": {
        }
      },
      {
        "message@invite.friend_panel": {
          "size": [ "100%", "100%c" ],
          "ignored": "$hide_err_message",
          "controls": [
            {
              "frame_label@invite.frame_label": {
                "text": "$err_message_text",
                "color": "$error_text_color"
              }
            }
          ]
        }
      },
      // Platform Friends
      {
        "online_platform@invite.friend_panel": {
          "size": [ "100%", 10 ],
          "controls": [
            {
              "frame_label@frame_label": {
                "text": "thirdPartyConsole.invite.OnlineFriends"
              }
            }
          ],
          "bindings": [
            {
              "binding_name": "#online_platform_friends_visible",
              "binding_name_override": "#visible"
            }
          ]
        }
      },
      {
        "vertical_padding_0": {
          "type": "panel",
          "size": [ "100%", 2 ],
          "visible": "$platform_invites_visible"
        }
      },
      {
        "online_platform_friend_list_category@invite.friends_category": {
          "$collection_name": "online_platform_friends",
          "$friends_category_grid_type": "invite.online_platform_friend_list_grid",
          "$button_focus_identifier": "online_platform_friends_pagination_controls",
          "$tts_section_header": "thirdPartyConsole.invite.OnlineFriends",
          "$visibility_binding": "#online_platform_friends_visible"
        }
      },
      {
        "crossplatform_disabled_panel": {
          "type": "image",
          "texture": "textures/ui/mainbanners",
          "size": [ "100%-8px", "100%c+8px" ],
          "controls": [
            {
              "disable_text": {
                "type": "label",
                "color": "$dark_button_default_text_color",
                "size": [ "100% - 8px", "default" ],
                "layer": 1,
                "shadow": false,
                "text": "crossPlatformToggle.crossPlatformDisabled.invite"
              }
            }
          ],
          "bindings": [
            {
              "binding_name": "(not #cross_platform_enabled)",
              "binding_name_override": "#visible"
            }
          ]
        }
      },
      {
        "crossplatform_disable_spacer": {
          "type": "panel",
          "size": [ "100%", 5 ],
          "bindings": [
            {
              "binding_name": "(not #cross_platform_enabled)",
              "binding_name_override": "#visible"
            }
          ]
        }
      },
      // Cross-Platform Friends
      {
        "online_cross_platform@invite.friend_panel": {
          "size": [ "100%", 10 ],
          "controls": [
            {
              "frame_label@invite.frame_label": {
                "text": "invite.OnlineFriends"
              }
            }
          ],
          "bindings": [
            {
              "binding_name": "#online_xbox_live_friends_visible",
              "binding_name_override": "#visible"
            }
          ]
        }
      },
      {
        "vertical_padding_1": {
          "type": "panel",
          "size": [ 0, 1 ]
        }
      },
      {
        "online_linked_account_friend_list_category@invite.friends_category": {
          "$collection_name": "online_linked_account_friends",
          "$friends_category_grid_type": "invite.online_linked_account_friend_list_grid",
          "$button_focus_identifier": "online_linked_account_friends_pagination_controls",
          "$tts_section_header": "invite.OnlineFriends",
          "$visibility_binding": "#online_linked_account_friends_visible"
        }
      },
      {
        "online_xbox_live_friend_list_category@invite.friends_category": {
          "$collection_name": "online_xbox_live_friends",
          "$friends_category_grid_type": "invite.online_xbox_live_friend_list_grid",
          "$button_focus_identifier": "online_xbox_live_friends_pagination_controls",
          "$tts_section_header": "invite.OnlineFriends",
          "$visibility_binding": "#online_xbox_live_friends_visible"
        }
      },
      // Platform Friends
      {
        "offline_platform@invite.friend_panel": {
          "size": [ "100%", 10 ],
          "controls": [
            {
              "frame_label@invite.frame_label": {
                "text": "thirdPartyConsole.invite.OfflineFriends"
              }
            }
          ],
          "bindings": [
            {
              "binding_name": "#offline_platform_friends_visible",
              "binding_name_override": "#visible"
            }
          ]
        }
      },
      {
        "vertical_padding_2": {
          "type": "panel",
          "size": [ 0, 1 ],
          "visible": "$platform_invites_visible"
        }
      },
      {
        "offline_platform_friend_list_category@invite.friends_category": {
          "$collection_name": "offline_platform_friends",
          "$friends_category_grid_type": "invite.offline_platform_friend_list_grid",
          "$button_focus_identifier": "offline_platform_friends_pagination_controls",
          "$tts_section_header": "thirdPartyConsole.invite.OfflineFriends",
          "$visibility_binding": "#offline_platform_friends_visible"
        }
      },
      {
        "no_platform_friends@invite.friend_panel": {
          "size": [ "100%", 30 ],
          "controls": [
            {
              "no_friends_tts_wrapper@common.tts_label_focus_wrapper": {
                "$tts_label_panel": "invite.no_platform_friends_frame_label"
              }
            }
          ],
          "bindings": [
            {
              "binding_name": "#no_platform_friends_visible",
              "binding_name_override": "#visible"
            }
          ]
        }
      },
      // Cross Platform Friends
      {
        "offline_cross_platform@invite.friend_panel": {
          "size": [ "100%", 10 ],
          "controls": [
            {
              "frame_label@invite.frame_label": {
                "text": "invite.OfflineFriends"
              }
            }
          ],
          "bindings": [
            {
              "binding_name": "#offline_xbox_live_friends_visible",
              "binding_name_override": "#visible"
            }
          ]
        }
      },
      {
        "vertical_padding_3": {
          "type": "panel",
          "size": [ 0, 1 ]
        }
      },
      {
        "offline_linked_account_friend_list_category@invite.friends_category": {
          "$collection_name": "offline_linked_account_friends",
          "$friends_category_grid_type": "invite.offline_linked_account_friend_list_grid",
          "$button_focus_identifier": "offline_linked_account_friends_pagination_controls",
          "$tts_section_header": "invite.OfflineFriends",
          "$visibility_binding": "#offline_linked_account_friends_visible"
        }
      },
      {
        "offline_xbox_live_friend_list_category@invite.friends_category": {
          "$collection_name": "offline_xbox_live_friends",
          "$friends_category_grid_type": "invite.offline_xbox_live_friend_list_grid",
          "$button_focus_identifier": "offline_xbox_live_friends_pagination_controls",
          "$tts_section_header": "invite.OfflineFriends",
          "$visibility_binding": "#offline_xbox_live_friends_visible"
        }
      },
      {
        "no_xbox_live_friends@invite.friend_panel": {
          "size": [ "100%", 30 ],
          "controls": [
            {
              "no_friends_tts_wrapper@common.tts_label_focus_wrapper": {
                "$tts_label_panel": "invite.no_xbox_live_friends_frame_label"
              }
            }
          ],
          "bindings": [
            {
              "binding_name": "#no_xbox_live_friends_visible",
              "binding_name_override": "#visible"
            }
          ]
        }
      }

      //{
      //  "suggested@friend_panel": {
      //    "size": [ "100%", 10 ],
      //    "controls": [
      //      {
      //        "frame_label@frame_label": {
      //          "text": "invite.SuggestedFriends"
      //        }
      //      }
      //    ]
      //  }
      //}
    ]
  },

  "invite_party_panel": {
    "type": "panel",
    "size": [ "96%", 40 ],
    "controls": [
      {
        "frame_label@frame_label": {
          "text": "invite.partyWithGameInvite.title",
          "layer": 3,
          "color": "$body_text_color",
          "offset": [ 5, 7 ]
        }
      },
      {
        "frame_description@frame_label": {
          "text": "invite.partyWithGameInvite.description",
          "size": [ "70%", 40 ],
          "layer": 3,
          "color": "$body_text_color",
          "offset": [ 5, 17 ],
          "font_scale_factor": 0.8
        }
      },
      {
        "our_toggle@settings_common.option_toggle_control": {
          "size": [
            64,
            32
          ],
          "offset": [ 15, 7 ],
          "anchor_to": "right_middle",
          "anchor_from": "right_middle",
          "$toggle_name": "invite_to_party",
          "$toggle_state_binding_name": "#invite_to_party",
          "$enabled": true,
          "$option_binding_name": "#include_entities_binding_name",
          "$option_enabled_binding_name": "#include_entities_enabled"
        }
      },
      {
        "border_outline@invite.black_border": {
          "layer": 1
        }
      }
    ]
  },

  "friend_button_test@invite.msa_friend_button": {
    "$checkbox_size": [ "100%", "100%" ]
  },

  "progress_bar_and_scrolling_content_panel": {
    "type": "panel",
    "anchor_from": "top_left",
    "anchor_to": "top_left",
    "size": [ "100%", "100%c" ],
    "controls": [
      {
        "progress_loading_bars@play.progress_loading_bars": {
          "offset": [ 0, 0 ], // offset on base control is [0,18] resetting this to zero
          "anchor_from": "center",
          "anchor_to": "center",
          "$visible_binding_name": "#is_loading"
        }
      },
      {
        "invite_scrolling_area@invite.scrolling_content_stack": {
          "bindings": [
            {
              "binding_name": "(not #is_loading)",
              "binding_name_override": "#visible",
              "binding_type": "global",
              "binding_condition": "always"
            }
          ]
        }
      }
    ]
  },

  "no_xbox_live_friends_frame_label@invite.frame_label": {
    "size": [ "default", 30 ],
    "max_size": [ "100% - 14px", 30 ],
    "text": "#no_xbox_live_friends_text",
    "anchor_from": "bottom_middle",
    "anchor_to": "bottom_middle",
    "bindings": [
      {
        "binding_name": "#no_xbox_live_friends_text"
      }
    ]
  },

  "no_platform_friends_frame_label@invite.frame_label": {
    "size": [ "default", 30 ],
    "max_size": [ "100% - 14px", 30 ],
    "text": "thirdPartyConsole.invite.noFriends",
    "anchor_from": "bottom_middle",
    "anchor_to": "bottom_middle"
  },

  "horizontal_invite_panel@common_dialogs.main_panel_one_button": {
    "size": "$large_screen_size",
    "$button_panel": "invite.horizontal_button_stack_panel",
    "$child_control": "invite.scrolling_area",
    "variables": [
      {
        "requires": "$is_inviting_to_realm",
        "$text_name": "invite.titleRealms"
      },
      {
        "requires": "(not $is_inviting_to_realm)",
        "$text_name": "invite.title"
      }
    ]
  },

  "vertical_invite_panel@common_dialogs.main_panel_two_buttons": {
    "size": "$large_screen_size",
    "$top_button_panel": "invite.vertical_buttons_top_panel",
    "$bottom_button_panel": "invite.vertical_buttons_bottom_panel",
    "$child_control": "invite.scrolling_area",
    "variables": [
      {
        "requires": "$is_inviting_to_realm",
        "$text_name": "invite.titleRealms"
      },
      {
        "requires": "(not $is_inviting_to_realm)",
        "$text_name": "invite.title"
      }
    ],
    "$add_button_mappings": [
      {
        "from_button_id": "button.controller_secondary_select",
        "to_button_id": "$pressed_button_name",
        "mapping_type": "global"
      },
      {
        "from_button_id": "button.menu_select",
        "to_button_id": "$pressed_button_name",
        "mapping_type": "pressed"
      },
      {
        "from_button_id": "button.menu_ok",
        "to_button_id": "$pressed_button_name",
        "mapping_type": "focused"
      }
    ]
  },

  "scrolling_area@common.scrolling_panel": {
    "anchor_to": "top_left",
    "anchor_from": "top_left",
    "$scrolling_pane_size": [ "100% - 2px", "100%" ],
    "$scrolling_pane_offset": [ 1, 0 ],
    "$scroll_bar_right_padding_size": [ 1, 0 ],
    "$scroll_bar_left_padding_size": [ 0, 0 ],
    "$scroll_size": [ 5, "100% - 4px" ],
    "$scrolling_content": "invite.progress_bar_and_scrolling_content_panel",
    "$show_background": false
  },

  "invite_button_content": {
    "type": "panel",
    "size": [ "100%", "100%" ],
    "layer": 2,
    "$label_color|default": "$light_button_default_text_color",
    "controls": [
      {
        "gameplay_helper@$gamepad_helper": {
          "$gamepad_helper_size": [ "100%", "100%" ],
          "$description_panel_size": [ "fill", "100%" ],
          "$gamepad_description_size": [ "100%", "default" ],
          "$gamepad_description_max_size": [ "100%", "100%" ],
          "$icon_description_bind": "$button_text",
          "$gamepad_helper_icon_description_text_color": "$label_color",
          "$gamepad_helper_icon_description_shadow": false,
          "$icon_description_bind_condition": "none"
        }
      },
      {
        "button_label": {
          "type": "label",
          "text": "$button_text",
          "layer": 3,
          "color": "$label_color",
          "text_alignment": "center",
          "$invite_label_binding_type|default": "none",
          "bindings": [
            {
              "binding_name": "(not #gamepad_helper_visible)",
              "binding_name_override": "#visible"
            },
            {
              "binding_name": "$button_text",
              "binding_type": "$invite_label_binding_type"
            }
          ]
        }
      }
    ]
  },
  "invite_button_content_hover@invite.invite_button_content": {
    "$label_color|default": "$light_button_hover_text_color"
  },
  "invite_button_content_pressed@invite.invite_button_content": {
    "$label_color|default": "$light_button_pressed_text_color"
  },
  "invite_button_content_locked@invite.invite_button_content": {
    "$label_color|default": "$light_button_locked_text_color"
  },
  "add_friend_button@common_buttons.light_content_button_control_content": {
    "ignored": "($is_inviting_to_realm or (not $supports_add_friend))",
    "$pressed_button_name": "button.add_friend",
    "$button_content": "invite.invite_button_content",
    "$button_content_hover": "invite.invite_button_content_hover",
    "$button_content_pressed": "invite.invite_button_content_pressed",
    "$button_content_locked": "invite.invite_button_content_locked",
    "$button_text|default": "networkWorld.add_friend",
    "$icon_description_bind_type": "none",
    "$gamepad_helper": "common.gamepad_helper_y",
    "size": "$button_size",
    "layer": 2,
    "button_mappings": "$add_button_mappings",
    "bindings": [
      {
        "binding_name": "#find_cross_platform_friends_enabled",
        "binding_name_override": "#enabled"
      }
    ]
  },

 "profile_button_content": {
    "type": "panel",
    "size": [ "100%", "100%" ],
    "layer": 2,
    "$label_color|default": "$light_button_default_text_color",
    "controls": [
      {
        "button_label": {
          "type": "label",
          "text": "$button_text",
          "layer": 3,
          "color": "$label_color",
          "text_alignment": "center",
          "$invite_label_binding_type|default": "none",
          "bindings": [
            {
              "binding_name": "$button_text",
              "binding_type": "$invite_label_binding_type"
            }
          ]
        }
      }
    ]
  },

  "profile_button_content_hover@invite.profile_button_content": {
    "$label_color|default": "$light_button_hover_text_color"
  },
  "profile_button_content_pressed@invite.profile_button_content": {
    "$label_color|default": "$light_button_pressed_text_color"
  },
  "profile_button_content_locked@invite.profile_button_content": {
    "$label_color|default": "$light_button_locked_text_color"
  },

  "add_member_button@common_buttons.light_content_button_control_content": {
    "ignored": "(not $can_manage_members)",
    "$pressed_button_name": "button.add_member",
    "$button_content": "invite.invite_button_content",
    "$button_content_hover": "invite.invite_button_content_hover",
    "$button_content_pressed": "invite.invite_button_content_pressed",
    "$button_content_locked": "invite.invite_button_content_locked",
    "$button_text": "invite.realm.add_member",
    "$icon_description_bind_type": "none",
    "$gamepad_helper": "common.gamepad_helper_y",
    "size": "$button_size",
    "anchor_from": "bottom_left",
    "anchor_to": "bottom_left",
    "layer": 2,
    "button_mappings": "$add_button_mappings"
  },

  "send_button@common_buttons.light_content_button_control_content": {
    "$pressed_button_name": "button.send_invites",
    "$button_content": "invite.invite_button_content",
    "$button_content_hover": "invite.invite_button_content_hover",
    "$button_content_pressed": "invite.invite_button_content_pressed",
    "$button_content_locked": "invite.invite_button_content_locked",
    "$button_text": "#send_button",
    "$invite_label_binding_type": "global",
    "$gamepad_helper": "common.gamepad_helper_x",
    "size": [ "fill", 30 ],
    "layer": 2,
    "button_mappings": [
      {
        "from_button_id": "button.controller_select",
        "to_button_id": "$pressed_button_name",
        "mapping_type": "global"
      },
      {
        "from_button_id": "button.menu_select",
        "to_button_id": "$pressed_button_name",
        "mapping_type": "pressed"
      },
      {
        "from_button_id": "button.menu_ok",
        "to_button_id": "$pressed_button_name",
        "mapping_type": "focused"
      }
    ]
  },

  "profile_button@common_buttons.light_content_button_control_content": {
    "$pressed_button_name": "button.view_profile",
    "$button_content": "invite.profile_button_content",
    "$button_content_hover": "invite.profile_button_content_hover",
    "$button_content_pressed": "invite.profile_button_content_pressed",
    "$button_content_locked": "invite.profile_button_content_locked",
    "$button_text|default": "menu.profile",
    "$icon_description_bind_type": "none",
    "size": "$button_size",
    "ignored": "(not $xbox_one)",
    "layer": 2,
    "button_mappings": [
      {
        "from_button_id": "button.menu_select",
        "to_button_id": "$pressed_button_name",
        "mapping_type": "pressed"
      },
      {
        "from_button_id": "button.menu_ok",
        "to_button_id": "$pressed_button_name",
        "mapping_type": "focused"
      }
    ],
    "bindings": [
      {
        "binding_type": "collection",
        "binding_name": "#profile_button_identifier",
        "binding_name_override": "#focus_identifier",
        "binding_collection_name": "$collection_name"
      }
    ]
  },

  "horizontal_button_stack_panel": {
    "type": "stack_panel",
    "orientation": "horizontal",
    "$button_size|default": [ "50% - 1px", 30 ],
    "$add_button_mappings": [
      {
        "from_button_id": "button.controller_secondary_select",
        "to_button_id": "$pressed_button_name",
        "mapping_type": "global"
      },
      {
        "from_button_id": "button.menu_select",
        "to_button_id": "$pressed_button_name",
        "mapping_type": "pressed"
      },
      {
        "from_button_id": "button.menu_ok",
        "to_button_id": "$pressed_button_name",
        "mapping_type": "focused"
      }
    ],
    "variables": [
      {
        "requires": "($is_inviting_to_realm and not $can_manage_members)",
        "$button_size": [ "100%", 30 ]
      }
    ],
    "controls": [
      {
        "add_friend_button@invite.add_friend_button": {
          "$focus_override_down": "FOCUS_OVERRIDE_STOP"
        }
      },
      {
        "add_member_button@invite.add_member_button": {
          "$focus_override_down": "FOCUS_OVERRIDE_STOP"
        }
      },
      {
        "padding": {
          "type": "panel",
          "size": [ 2, 0 ],
          "visible": "(not $is_inviting_to_realm or $can_manage_members)"
        }
      },
      {
        "send_button@invite.send_button": {
          "$focus_override_down": "FOCUS_OVERRIDE_STOP"
        }
      }
    ]
  },

  "vertical_buttons_top_panel": {
    "type": "panel",
    "$button_size|default": [ "100%", 30 ],
    "controls": [
      {
        "add_friend_button@invite.add_friend_button": {
          "$focus_override_left": "FOCUS_OVERRIDE_STOP",
          "$focus_override_right": "FOCUS_OVERRIDE_STOP"
        }
      },
      {
        "add_member_button@invite.add_member_button": {
          "$focus_override_left": "FOCUS_OVERRIDE_STOP",
          "$focus_override_right": "FOCUS_OVERRIDE_STOP"
        }
      }
    ]
  },

  "vertical_buttons_bottom_panel": {
    "type": "panel",
    "controls": [
      {
        "send_button@invite.send_button": {
          "size": [ "100%", 30 ],
          "$focus_override_down": "FOCUS_OVERRIDE_STOP",
          "$focus_override_left": "FOCUS_OVERRIDE_STOP",
          "$focus_override_right": "FOCUS_OVERRIDE_STOP"
        }
      }
    ]
  },

  "gamepad_helpers": {
    "type": "panel",
    "layer": 2,
    "controls": [
      {
        "gamepad_helper_a@common.gamepad_helper_a": {
          "anchor_from": "bottom_right",
          "anchor_to": "bottom_right"
        }
      }
    ]
  },

  // -----------------------------------------------
  //
  //    screen
  //
  // -----------------------------------------------
  "invite_screen@common.base_screen": {
    "type": "screen",
    "button_mappings": [
      {
        "from_button_id": "button.menu_cancel",
        "to_button_id": "button.menu_exit",
        "mapping_type": "global"
      }
    ],
    "$screen_content": "invite.invite_screen_content"
  },

  "invite_screen_content": {
    "type": "panel",
    "anchor_from": "top_left",
    "anchor_to": "top_left",
    "$invite_panel|default": "invite.horizontal_invite_panel",
    "variables": [
      {
        "requires": "($use_vertical_button_stack_panel and (not $is_inviting_to_realm or $can_manage_members))",
        "$invite_panel": "invite.vertical_invite_panel"
      }
    ],
    "controls": [
      { "gamepad_helpers@invite.gamepad_helpers": {} },
      {
        "invite_panel@$invite_panel": {
          "layer": 1
        }
      }
    ]
  }
}
