/********************************************************
+*   (c) Mojang. All rights reserved                       *
+*   (c) Microsoft. All rights reserved.                   *
+*********************************************************/

{
  "namespace": "sync_iaps_to_xbl",

  "padding": {
    "type": "panel",
    "size": [ "100%", 2 ]
  },

  "image_panel": {
    "type": "panel",
    "size": [ "100%", "100%c + 2px" ],
    "controls": [
      {
        "image": {
          "type": "image",
          "texture": "textures/ui/xboxconversionkeyart",
          "size": [ "100% - 2px", "42.86%x" ],
          "controls": [
            {
              "border@common.square_image_border_white": {
                "size": [ "100% + 2px", "100% + 2px" ],
                "layer": 2,
                "color": [ 0, 0, 0 ]
              }
            }
          ]
        }
      }
    ]
  },

  "dialog_content": {
    "type": "stack_panel",
    "size": [ "100% - 4px", "100% - 4px" ],
    "controls": [
      {
        "image_panel@sync_iaps_to_xbl.image_panel": {}
      },
      {
        "padding_0@sync_iaps_to_xbl.padding": {}
      },
      {
        "description_label_wrapper@common.tts_label_focus_wrapper": {
          "size": [ "100%", "fill" ],
          "$tts_label_panel": "sync_iaps_to_xbl.scrolling_panel",
          "$focus_border_size": [ "100% + 2px", "100%" ]
        }
      },
      {
        "padding_1@sync_iaps_to_xbl.padding": {}
      },
      {
        "button_panel": {
          "type": "stack_panel",
          "orientation": "horizontal",
          "size": [ "100%", 30 ],
          "controls": [
            {
              "sync_iaps_to_xbl_button@common_buttons.light_text_button": {
                "$pressed_button_name": "button.sync_now",
                "$button_text": "xbl.syncIAP.syncNow",
                "size": [ "50% - 1px", 30 ],
                "$button_text_max_size": [ "100%", 20 ]
              }
            },
            {
              "padding": {
                "type": "panel",
                "size": [ 2, "100%" ]
              }
            },
            {
              "skip_claim_button@common_buttons.light_text_button": {
                "$pressed_button_name": "button.sync_later",
                "$button_text": "xbl.syncIAP.syncLaterEllipsis",
                "size": [ "50% - 1px", 30 ],
                "$button_text_max_size": [ "100%", 20 ]
              }
            }
          ]
        }
      }
    ]
  },

  "scrolling_panel@common.scrolling_panel": {
    "$show_background": false,
    "$scroll_box_visible_touch": true,
    "size": [ "100%", "100%" ],
    "$scrolling_content": "sync_iaps_to_xbl.description_label_panel",
    "$scroll_size": [ 5, "100%" ],
    "$scrolling_pane_size": [ "100%", "100%" ],
    "$scrolling_pane_offset": [ 0, 0 ],
    "$scroll_bar_right_padding_size": [ 0, 0 ]
  },

  "description_label_panel": {
    "type": "panel",
    "size": [ "100%", "100%c" ],
    "layer": 1,
    "$font_scale": 0.8,
    "controls": [
      {
        "line1": {
          "type": "label",
          "size": [ "100%", "default" ],
          "text": "xbl.syncIAP.description",
          "font_type": "smooth",
          "color": "$body_text_color",
          "font_scale_factor": "$font_scale",
          "bindings": [
            {
              "binding_type": "global",
              "binding_condition": "once",
              "binding_name": "#tts_dialog_body"
            }
          ],
          "property_bag": {
            "#tts_dialog_body": "xbl.syncIAP.description"
          }
        }
      }
    ]
  },

  // -----------------------------------------------
  //
  //    screen
  //
  // -----------------------------------------------
  "sync_iaps_to_xbl_screen@common.base_screen": {
    "button_mappings": [
      {
        "from_button_id": "button.menu_cancel",
        "to_button_id": "button.sync_later",
        "mapping_type": "global"
      }
    ],
    "$screen_content": "sync_iaps_to_xbl.sync_iaps_to_xbl_screen_content"
  },

  "sync_iaps_to_xbl_screen_content": {
    "type": "panel",
    "controls": [
      {
        "root_panel": {
          "type": "panel",
          "controls": [
            { "dialog@sync_iaps_to_xbl.screen_dialog": { "layer": 1 } }
          ]
        }
      }
    ]
  },

  "screen_dialog@common_dialogs.main_panel_no_buttons": {
    "$text_name": "xbl.syncIAP.title",
    "$child_control": "sync_iaps_to_xbl.dialog_content",
    "$show_close_button": false,
    "size": [ 240, "100% - 4px" ]
  }
}