{
  "namespace": "patch_notes",

  "solid_texture": {
    "type": "image",
    "texture": "textures/ui/White",
    "color": [ 0.0, 0.0, 0.0 ]
  },

  "image_with_background@patch_notes.solid_texture": {
    "$background_size|default": [ "100%", "100%" ],
    "size": "$background_size",
    "controls": [
      {
        "image@$image": {
          "layer": 1,
          "$image_size|default": [ "100%-2px", "100%-2px" ],
          "size": "$image_size",
          "controls": [
            {
              "loading_animation@common_store.progress_loading": {
                "$hide_failure_text": true,
                "$use_sibling_scope": false,
                "layer": 2,
                "bindings": [
                  {
                    "binding_name": "#loading_patch_notes",
                    "binding_name_override": "#visible",
                    "binding_condition": "always_when_visible",
                    "binding_type": "global"
                  }
                ]
              }
            }
          ]
         }
      }
    ]
  },

  "white_image@patch_notes.solid_texture": {
    "color": [ 1, 1, 1 ]
  },

  "patch_main_image": {
    "type": "image",
    "bindings": [
      {
        "binding_name": "#main_image_texture",
        "binding_name_override": "#texture",
        "binding_type": "global"
      },
      {
        "binding_name": "#main_image_texture_source",
        "binding_name_override": "#texture_file_system",
        "binding_type": "global"
      },
      {
        "binding_name": "(not #loading_patch_notes)",
        "binding_name_override": "#visible"
      }
    ]
  },

  "store_image": {
    "type": "image",
    "bindings": [
      {
        "binding_name": "#store_image_texture",
        "binding_name_override": "#texture",
        "binding_type": "global"
      },
      {
        "binding_name": "#store_image_texture_source",
        "binding_name_override": "#texture_file_system",
        "binding_type": "global"
      }
    ]
  },

  "patch_notes_header_background": {
    "type": "panel",
    "controls": [
      {
        "black_background": {
          "type": "image",
          "texture": "textures/ui/mainbanners",
          "size": "$control_size",
          "$control_size|default": [ "100%", "100%" ],
          "variables": [
            {
              "requires": "(not $show_patch_image and not $show_button)",
              "$control_size": [ "100%", "100%c" ]
            }
          ],
          "controls": [
            {
              "content@$header_content": {
                "variables": [
                  {
                    "requires": "(not $show_button)",
                    "$header_size": [ "100%-6px", "100%c" ]
                  }
                ],

                "$header_size|default": [ "100%-6px", "50%c" ],
                "size": "$header_size"
              }
            }
          ]
        }
      }
    ]
  },

  "button_label_panel": {
    "type": "panel",
    "size": [ "100%", "100%c" ],
    "controls": [
      {
        "text_label": {
          "type": "label",
          "color": "$text_color",
          "text": "#patch_link_button_text",
          "size": [ "default", "default" ],
          "max_size": [ "100%", "default" ],
          "bindings": [
            {
              "binding_name": "#patch_link_button_text"
            }
          ]
        }
      }
    ]
  },
  "button_content": {
    "type": "panel",
    "controls": [
      {
        "button_label2@patch_notes.button_label_panel": {}
      }
    ]
  },

  "patch_image@patch_notes.image_with_background": {
    "$image": "patch_notes.patch_main_image",
    "$background_size": [ "60% - 2px", "56.25%x + 2px" ],
    "$image_size": [ "100% - 2px", "56.25%x" ]
  },

  "patch_notes_header_content_without_offer": {
    "type": "panel",
    "layer": 1,
    "$show_patch_image_full_width|default": false,
    "controls": [
      {
        "patch_image@patch_notes.patch_image": {
          "variables": [
            {
              "requires": "$show_patch_image_full_width",
              "$background_size": [ "100%", "100%c + 2px" ],
              "$image_size": [ "100% - 2px", "33.33%x" ]
            }
          ]
        }
      }
    ]
  },


  "patch_notes_header_content_with_offer": {
    "type": "stack_panel",
    "orientation": "horizontal",
    "layer": 1,
    "controls": [
      {
        "patch_image@patch_notes.patch_image": {
          "min_size": [ "60% - 2px", "56.25%x - 2px" ]
        }
      },
      {
        "padding": {
          "type": "panel",
          "size": [ 2, 0 ]
        }
      },
      {
        "store_item_section": {
          "type": "stack_panel",
          "orientation": "vertical",
          "size": [ "fill", "100%c" ],
          "controls": [
            {
              "store_image@patch_notes.image_with_background": {
                "$image": "patch_notes.store_image",
                "$background_size": [ "100%", "100%c + 2px" ],
                "$image_size": [ "100%-2px", "56.25%x" ]
              }
            },
            {
              "padding": {
                "type": "panel",
                "size": [ 0, 2 ]
              }
            },
            {
              "store_button@patch_notes.store_button": {
                "size": [ "100%", "28.125%x - 3.3px" ]
              }
            }
          ]
        }
      }
    ]
  },

  "store_button": {
    "type": "panel",
    "$progress_loading_focus_precedence|default": 0,
    "controls": [
      {
        "store_button@common_buttons.light_content_button": {
          "$pressed_button_name": "button.menu_store_offer",
          "$button_content": "patch_notes.button_content",
          "enabled": "$is_pregame",
          "$button_tts_name": "#tts_offer_name",
          "$button_tts_control_type_order_priority": 10,
          "bindings": [
            {
              "binding_name": "(not #loading_patch_notes)",
              "binding_name_override": "#visible",
              "binding_condition": "always"
            },
            {
              "binding_name": "#tts_offer_name"
            }
          ]
        }
      },
      {
        "loading_animation@pdp.focus_border": {
          "size": ["100%", "60px"],
          "bindings": [
            {
              "binding_name": "#loading_patch_notes",
              "binding_name_override": "#visible",
              "binding_condition": "always_when_visible"
            }
          ]
        }
      }
    ]
  },

  "patch_notes_header": {
    "type": "panel",
    "size": [ "100%", "100%c" ],
    "controls": [
      {
        "patch_notes_background@patch_notes.patch_notes_header_background": {
          "size": [ "100% - 4px", "33.75%x + 2px" ],
          "$control_size": [ "100% - 4px", "33.75%x + 2px" ],
          "variables": [
            {
              "requires": "$show_button",
              "$header_content": "patch_notes_header_content_with_offer"

            }
          ],
          "$header_content|default": "patch_notes_header_content_without_offer"
        }
      }
    ]
  },

  "scroll_content": {
    "type": "stack_panel",
    "orientation": "vertical",
    "size": [ "100%", "default" ],
    "controls": [
      {
        "padding_0": {
          "type": "panel",
          "size": [ 0, 2 ]
        }
      },
      { "patch_notes_header@patch_notes.patch_notes_header": {} },
      {
        "padding_1": {
          "type": "panel",
          "size": [ 0, 2 ]
        }
      },
      {
        "tts_label_wrapper@common.tts_label_focus_wrapper": {
          "$tts_label_panel": "patch_notes.patch_notes_panel"
        }
      }
    ]
  },

  "patch_notes_panel": {
    "type": "panel",
    "size": [ "100%", "100%c" ],
    "controls": [
      {
        "patch_notes_text": {
          "type": "label",
          "color": "$body_text_color",
          "size": [ "100%-4px", "default" ],
          "text": "#patch_description",
          "font_type": "smooth",
          "bindings": [
            {
              "binding_name": "#patch_description",
              "binding_type": "global"
            },
            {
              "binding_type": "global",
              "binding_name": "#tts_dialog_body"
            }
          ],
          "property_bag": {
            "#tts_dialog_body": "#patch_description"
          },
          "controls": [
            {
              "loading_animation@common_store.progress_loading": {
                "size": [ "100%", "100%" ],
                "$hide_failure_text": true,
                "$use_sibling_scope": false,
                "bindings": [
                  {
                    "binding_name": "#loading_patch_notes",
                    "binding_name_override": "#visible",
                    "binding_condition": "always_when_visible",
                    "binding_type": "global"
                  }
                ]
              }
            }
          ]
        }
      }
    ]
  },

  "patch_notes_content": {
    "type": "panel",
    "controls": [
      {
        "scrolling_panel@common.scrolling_panel": {
          "$scrolling_content": "patch_notes.scroll_content",
          "$show_background": false,
          "$scroll_size": [ 4, "100% - 4px" ],
          "$scrolling_pane_size|default": [ "100%", "default" ],
          "$always_handle_scrolling": true
        }
      }
    ]
  },

  "continue_button@common_buttons.light_text_button": {
    "$button_text": "patchNotes.continue",
    "$pressed_button_name": "button.menu_exit",
    "$button_focus_precedence": 1
  },

  "patch_notes_dialog@common_dialogs.main_panel_small_title_one_button": {
    "size": "$patch_notes_screen_size",

    "$custom_title_label": "common_dialogs.standard_title_label",
    "$text_name": "#dialog_title",
    "$title_text_binding_type": "global",
    "$use_custom_title_control": true,

    "$child_control": "patch_notes.patch_notes_content",
    "$button_panel": "patch_notes.continue_button"
  },

  "patch_notes_screen@common.base_screen": {
    "$screen_content": "patch_notes.patch_notes_dialog"
  },

  "sunsetting_button_panel": {
    "type": "stack_panel",
    "orientation": "vertical",
    "size": [ "100%", "60px" ],
    "controls": [
      {
        "padding_0": {
          "type": "panel",
          "size": [ "100%", 10 ]
        }
      },
      {
        "more_info_button@common_buttons.light_text_button": {
          "$button_text": "sunsetting.popup.moreInfo",
          "$pressed_button_name": "sunsetting.moreInfo",
          "$button_focus_precedence": 1,
          "size": [ "100%", "20px" ]
        }
      },
      {
        "padding_1": {
          "type": "panel",
          "size": [ "100%", 1 ]
        }
      },
      {
        "continue_button@common_buttons.light_text_button": {
          "$button_text": "patchNotes.continue",
          "$pressed_button_name": "button.menu_exit",
          "$button_focus_precedence": 2,
          "size": [ "100%", "20px" ]
        }
      },

      {
        "padding_2": {
          "type": "panel",
          "size": [ "100%", 1 ]
        }
      },
      {
        "sunsetting_toggle_panel@common.checkbox": {
          "$toggle_name": "sunsetting_do_not_show_again",
          "$toggle_state_binding_name": "#sunsetting_do_not_show_again",
          "$toggle_label_text|default": "sunsetting.popup.dontshow",
          "size": [ "100%", 10 ],
          "anchor_from": "top_left",
          "anchor_to": "top_left",
      
          "tts_control_type_order_priority": 100,
          "tts_value_order_priority": 101,
          "$toggle_enabled_binding_type": "global",
      
          "controls": [
            {
              "header_description_stack_panel": {
                "type": "stack_panel",
                "orientation": "horizontal",
                "size": [ "100%", "100%" ],
                "anchor_from": "top_left",
                "anchor_to": "top_left",
      
                "controls": [
                  {
                    "checkbox_visuals@common.toggle_visuals": {
                      "size": [ 30, "100%" ],
                      "anchor_from": "left_middle",
                      "anchor_to": "left_middle"
                    }
                  },
                  {
                    "buffer_panel": {
                      "type": "panel",
                      "layer": 3,
                      "size": [ "fill", "100%" ],
                      "controls": [
                        {
                          "label": {
                            "type": "label",
                            "color": "$light_button_default_text_color",
                            "text": "$toggle_label_text",
                            "size": [ "default", "default" ],
                            "anchor_from": "center",
                            "anchor_to": "center"
                          }
                        }
                      ]
                    }
                  },
                  {
                    "another_panel": {
                      "type": "panel",
                      "size": [ 30, "100%" ]
                    }
                  }
                ]
              }
            }
          ]
        }
      }
    ]
  },

  "sunsetting_content": {
    "type": "panel",
    "controls": [
      {
        "scrolling_panel@common.scrolling_panel": {
          "$scrolling_content": "patch_notes.scroll_content",
          "$show_background": false,
          "$scroll_size": [ 4, "100% - 4px" ],
          "$scrolling_pane_size|default": [ "100%", "92%" ],
          "$main_panel_size": [ "100% - 16px", "100% - 89px" ],
          "$always_handle_scrolling": true
        }
      }
    ]
  },

  "sunsetting_dialog@common_dialogs.main_panel_small_title_one_button": {
    "size": "$patch_notes_screen_size",

    "$custom_title_label": "common_dialogs.standard_title_label",
    "$text_name": "#dialog_title",
    "$title_text_binding_type": "global",
    "$use_custom_title_control": true,

    "$child_control": "patch_notes.sunsetting_content",
    "$button_panel": "patch_notes.sunsetting_button_panel",
    "$button_panel_size": [ "100% - 14px", 60 ]
  },

  "sunsetting_screen@common.base_screen": {
    "$screen_content": "patch_notes.sunsetting_dialog"
  }
}