{
  "namespace": "toast_screen",

  "popup_anim_wait": {
    "anim_type": "wait",
    "duration": "$display_time",
    "next": "@toast_screen.popup_anim_end"
  },

  "popup_anim_start": {
    "anim_type": "offset",
    "easing": "spring",
    "from": [ 0, 0 ],
    "to": "$popup_distance",
    "duration": "$transition_in_time",
    "next": "@toast_screen.popup_anim_wait"
  },

  "popup_anim_end": {
    "anim_type": "offset",
    "easing": "in_sine",
    "to": [ 0, 0 ],
    "from": "$popup_distance",
    "duration": "$transition_out_time",
    "destroy_at_end": "popup",
    "end_event": "toast_end"
  },

  "toast_image": {
    "type": "image",
    "size": [ 13, 13 ],
    "anchor_from": "left_middle",
    "anchor_to": "left_middle",
    "texture": "$toast_texture",
    "layer": 1
  },

  "toast_icon": {
    "type": "panel",
    "size": [ "100%c", "100%" ],
    "controls": [
      {
        "toast_icon@toast_screen.toast_image": {}
      }
    ]
  },

  "xbox_icon@toast_screen.toast_icon": {
    "$toast_texture": "textures/ui/xbox4"
  },

  "third_party_invite_icon@toast_screen.toast_icon": {
    "$toast_texture": "textures/ui/invite_third_party"
  },

  "third_party_achievement_icon@toast_screen.toast_icon": {
    "$toast_texture": "textures/ui/achievement_third_party"
  },

  "resource_pack_icon": {
    "type": "panel",
    "size": [ "100%c", "100%" ],
    "$icon_size|default": [ 13, 13 ],
    "controls": [
      {
        "resource_pack_image": {
          "type": "image",
          "size": "$icon_size",
          "anchor_from": "left_middle",
          "anchor_to": "left_middle",
          "layer": 1,
          "texture": "#icon_path",
          "zip_folder": "#icon_zip",
          "texture_file_system": "#icon_file_system",
          "bindings": [
            {
              "binding_name": "#icon_path",
              "binding_name_override": "#texture"
            },
            {
              "binding_name": "#icon_zip",
              "binding_name_override": "#zip_folder"
            },
            {
              "binding_name": "#icon_file_system",
              "binding_name_override": "#texture_file_system"
            }
          ]
        }
      }
    ]
  },

  "key_art_image@toast_screen.resource_pack_icon": {
    "$icon_size": [ "177.78%y", 18 ]
  },


  "gamer_score_icon": {
    "type": "image",
    "texture": "textures/ui/gamerscore",
    "size": [ 7, 7 ]
  },

  "toast_label": {
    "type": "label",
    "color": "$toast_text_color",
    "layer": 1,
    "shadow": false,
    "font_size": "normal",
    "offset": [ 0, 5 ]
  },

  "popup@common.input_panel": {
    "anchor_from": "top_middle",
    "anchor_to": "bottom_middle",
    "size": "$popup_size",
    "controls": [
      {
        "background": {
          "type": "image",
          "texture": "textures/ui/greyBorder"
        }
      },
      {
        "popup_content": {
          "type": "stack_panel",
          "orientation": "horizontal",
          "size": [ "100%", "100%" ],
          "anchor_from": "top_left",
          "anchor_to": "top_left",
          "offset": [ 6, 0 ],
          "layer": 1,
          "controls": [
            {
              "icon_padding": {
                "layer": 1,
                "type": "stack_panel",
                "anchor_from": "top_left",
                "anchor_to": "top_left",
                "size": [ "100%c", "100%" ],
                "factory": {
                  "name": "toast_image_factory",
                  "control_ids": {
                    "xbox_icon": "@toast_screen.xbox_icon",
                    "third_party_achievement_icon": "@toast_screen.third_party_achievement_icon",
                    "third_party_invite_icon": "@toast_screen.third_party_invite_icon",
                    "icon_resource_pack": "@toast_screen.resource_pack_icon",
                    "key_art_image": "@toast_screen.key_art_image"
                  },
                  "factory_variables": [
                    "$hide_xbox_live_icon"
                  ]
                },
                "bindings": [
                  {
                    "binding_type": "global",
                    "binding_name": "#toast_icon_section_content",
                    "binding_name_override": "#collection_length"
                  }
                ]
              }
            },
            {
              "text_padding": {
                "type": "panel",
                "size": [ 2, "100%" ],
                "bindings": [
                  {
                    "binding_name": "#text_padding_visible",
                    "binding_name_override": "#visible"
                  }
                ]
              }
            },
            {
              "text_panel": {
                "type": "panel",
                "size": [ "fill", "100%" ],
                "controls": [
                  {
                    "text_stack_panel@toast_screen.text_stack_panel": {}
                  }
                ]
              }
            }
          ]
        }
      }
    ],
    "anims": [
      "@toast_screen.popup_anim_start"
    ]
  },


  "text_stack_panel": {
    "type": "stack_panel",
    "size": [ "100%", 20 ],
    "offset": [ 0, 1 ],
    "controls": [
      {
        "title@toast_screen.toast_label": {
          "text": "#toast_title",
          "color": "$toast_text_color",
          "size": [ "100%-10px", "fill" ],
          "layer": 2,
          "bindings": [
            {
              "binding_name": "#toast_title"
            }
          ]
        }
      },
      {
        "subtitle": {
          "type": "stack_panel",
          "orientation": "horizontal",
          "size": [ "100%-10px", "100%cm" ],
          "controls": [
            {
              "icon_padding": {
                "type": "panel",
                "size": [ 9, 7 ],
                "bindings": [
                  {
                    "binding_name": "#is_achievement",
                    "binding_name_override": "#visible"
                  }
                ],
                "controls": [
                  {
                    "gamer_score_icon@toast_screen.gamer_score_icon": {
                      "offset": [ 0, 1 ],
                      "layer": 1,
                      "anchor_from": "left_middle",
                      "anchor_to": "left_middle"
                    }
                  }
                ]
              }
            },
            {
              "subtext@toast_screen.toast_label": {
                "size": [ "fill", 10 ],
                "text": "#toast_subtitle",
                "bindings": [
                  {
                    "binding_name": "#toast_subtitle"
                  },
                  {
                    "binding_name": "#toast_subtitle_visible",
                    "binding_name_override": "#visible"
                  }
                ]
              }
            }
          ]
        }
      }
    ]
  },

  "join_button_icon": {
    "type": "image",
    "texture": "textures/ui/xbox_start_button",
    "size": [ 26, 26 ],
    "bindings": [
      {
        "binding_name": "#controller_start_icon",
        "binding_name_override": "#texture"
      }
    ]
  },

  "splitscreen_join_popup": {
    "type": "stack_panel",
    "orientation": "horizontal",
    "anchor_from": "top_middle",
    "anchor_to": "top_middle",
    "layer": 10,
    "size": [ "100%c", 26 ],
    "offset": [ 0, "60%" ],
    "controls": [
      {
        "join_button_icon@toast_screen.join_button_icon": {}
      },
      {
        "join_prompt_text_panel": {
          "type": "panel",
          "size": [ "100%c", "100%" ],
          "controls": [
            {
              "join_prompt_text": {
                "type": "label",
                "text": "$player_join_text",
                "color": "$toast_text_color",
                "shadow": true
              }
            }
          ]
        }
      }
    ]
  },

  "toast_screen@common.base_screen": {
    "send_telemetry": false,
    "screen_not_flushable": true,
    "render_game_behind": true,
    "is_showing_menu": false,
    "is_modal": true,
    "low_frequency_rendering": true,
    "should_steal_mouse": false,
    "render_only_when_topmost": false,
    "screen_draws_last": true,
    "$screen_content": "toast_screen.toast_screen_content",
    "$screen_animations": [],
    "$use_loading_bars": false
  },

  "toast_screen_content": {
    "type": "panel",
    "clips_children": true,
    "factory": {
      "name": "toast_factory",
      "control_ids": {
        "popup": "popup@toast_screen.popup",
        "splitscreen_join_popup": "splitscreen_join_popup@toast_screen.splitscreen_join_popup"
      }
    },
    "controls": [
      { "content_log_panel@content_log.content_log_panel": {} },
      { "perf_turtle_panel@perf_turtle.perf_turtle_panel": {} }
    ]
  }
}