{
  "namespace": "file_upload",

  //---------------------------------------------------------------------------
  // Progress Bar
  //---------------------------------------------------------------------------

  "empty_progress_bar_icon": {
    "type": "image",
    "texture": "textures/ui/experiencebarempty"
  },

  "full_progress_bar_icon": {
    "type": "image",
    "texture": "textures/ui/experiencebarfull",
    "clip_direction": "left",
    "clip_pixelperfect": false,
    "$progress_bindings|default": [
      {
        "binding_name": "#progress_percentage",
        "binding_name_override": "#clip_ratio",
        "binding_type": "global"
      }
    ],
    "bindings": "$progress_bindings"
  },

  "progress_bar_nub": {
    "type": "image",
    "texture": "textures/ui/experiencenub",
    "tiled": true
  },

  "progress_bar_icon": {
    "type": "panel",
    "controls": [
      {
        "empty_progress_bar_icon@file_upload.empty_progress_bar_icon": {
          "layer": 1,
          "visible": "#progress_visible",
          "bindings": [
            {
              "binding_name": "#progress_visible",
              "binding_name_override": "#visible"
            }
          ]
        }
      },
      {
        "progress_percent_panel": {
          "type": "panel",
          "layer": 2,
          "visible": "#progress_visible",
          "controls": [
            {
              "full_progress_bar_icon@file_upload.full_progress_bar_icon": {
                "layer": 2
              }
            },
            {
              "progress_bar_nub@file_upload.progress_bar_nub": {
                "size": [ "100% - 10px", 5 ],
                "layer": 3
              }
            }
          ],
          "bindings": [
            {
              "binding_name": "#progress_visible",
              "binding_name_override": "#visible"
            }
          ]
        }
      }
    ]
  },

  //---------------------------------------------------------------------------
  // Progress Labels
  //---------------------------------------------------------------------------

  "common_label": {
    "type": "label",
    "color": "$body_text_color",
    "size": [ "default", "100%" ],
    "text": "#label_text",
    "bindings": [
      {
        "binding_name": "$label_binding_name",
        "binding_name_override": "#label_text"
      }
    ]
  },

  "progress_text_panel": {
    "type": "panel",
    "visible": "#progress_text_visible",
    "controls": [
      {
        "progress@file_upload.common_label": {
          "layer": 1,
          "anchor_from": "top_left",
          "anchor_to": "top_left",
          "$label_binding_name": "#progress_size_label"
        }
      },
      {
        "total@file_upload.common_label": {
          "layer": 1,
          "anchor_from": "top_right",
          "anchor_to": "top_right",
          "$label_binding_name": "#total_size_label"
        }
      }
    ],
    "bindings": [
      {
        "binding_name": "#progress_text_visible",
        "binding_name_override": "#visible"
      }
    ]
  },

  "message_text_panel": {
    "type": "panel",
    "visible": "#message_text_visible",
    "controls": [
      {
        "message_text@file_upload.common_label": {
          "layer": 1,
          "anchor_from": "center",
          "anchor_to": "center",
          "$label_binding_name": "#message_text"
        }
      }
    ],
    "bindings": [
      {
        "binding_name": "#message_text_visible",
        "binding_name_override": "#visible"
      },
      {
        "binding_name": "#message_text"
      }
    ]
  },

  //---------------------------------------------------------------------------
  // Buttons
  //---------------------------------------------------------------------------

  "button_common@common_buttons.light_text_button": {
    "layer": 1,
    "size": [ "100%", "100%" ]
  },

  "lets_go_button@file_upload.button_common": {
    "$pressed_button_name": "button.file_upload_play",
    "$button_text": "progressScreen.message.letsGo"
  },

  "cancel_button@file_upload.button_common": {
    "$pressed_button_name": "button.file_upload_cancel",
    "$button_text": "gui.cancel"
  },

  "continue_button@file_upload.button_common": {
    "$pressed_button_name": "button.file_upload_wifi_warning_continue",
    "$button_text": "permissions.Continue"
  },

  "continue_or_cancel_button": {
    "type": "panel",
    "controls": [
      {
        "continue@file_upload.continue_button": {
          "anchor_from": "top_left",
          "anchor_to": "top_left",
          "size": [ "50% - 1px", "100%" ]
        }
      },
      {
        "cancel@file_upload.cancel_button": {
          "anchor_from": "top_right",
          "anchor_to": "top_right",
          "size": [ "50% - 1px", "100%" ]
        }
      }
    ]
  },

  //---------------------------------------------------------------------------
  // Main Panels
  //---------------------------------------------------------------------------

  "single_title_panel": {
    "type": "panel",
    "controls": [
      {
        "center@file_upload.common_label": {
          "layer": 1,
          "$label_binding_name": "#single_title_label"
        }
      }
    ]
  },

  "dual_title_panel": {
    "type": "panel",
    "controls": [
      {
        "left@file_upload.common_label": {
          "layer": 1,
          "anchor_from": "top_left",
          "anchor_to": "top_left",
          "$label_binding_name": "#dual_title_left_label"
        }
      },
      {
        "right@file_upload.common_label": {
          "layer": 1,
          "anchor_from": "top_right",
          "anchor_to": "top_right",
          "$label_binding_name": "#dual_title_right_label"
        }
      }
    ]
  },

  "upload_title_panel": {
    "type": "panel",
    "controls": [
      {
        "single_label@file_upload.single_title_panel": {
          "bindings": [
            {
              "binding_name": "#single_label_visible",
              "binding_name_override": "#visible"
            }
          ]
        }
      },
      {
        "dual_label@file_upload.dual_title_panel": {
          "bindings": [
            {
              "binding_name": "#dual_label_visible",
              "binding_name_override": "#visible"
            }
          ]
        }
      }
    ]
  },

  "content_panel": {
    "type": "panel",
    "controls": [
      {
        "stack_panel_0@file_upload.content_stack_panel": {
          "bindings": [
            {
              "binding_name": "#upload_content_visible",
              "binding_name_override": "#visible"
            }
          ]
        }
      },
      {
        "stack_panel_1@file_upload.warning_content_panel": {
          "bindings": [
            {
              "binding_name": "#warning_content_visible",
              "binding_name_override": "#visible"
            }
          ]
        }
      }
    ]
  },

  "content_stack_panel": {
    "type": "stack_panel",
    "orientation": "vertical",
    "size": [ "100%", "100%c" ],
    "controls": [
      {
        "message@message_text_panel": {
          "layer": 1,
          "size": [ "100%", 10 ]
        }

      },
      {
        "description@progress_text_panel": {
          "layer": 1,
          "size": [ "100%", 10 ]
        }
      },
      {
        "progress@file_upload.progress_bar_icon": {
          "layer": 1,
          "size": [ "100%", 5 ]
        }
      }
    ]
  },

  "warning_content_panel": {
    "type": "panel",
    "controls": [
      {
        "message": {
          "type": "label",
          "color": "$body_text_color",
          "size": [ "100%", "default" ],
          "text": "You are not currently connected to wifi.  Mobile data charges might apply."
        }
      }
    ]
  },

  "button_panel": {
    "type": "panel",
    "controls": [
      {
        "play@file_upload.lets_go_button": {
          "bindings": [
            {
              "binding_name": "#play_button_visible",
              "binding_name_override": "#visible"
            }
          ]
        }
      },
      {
        "cancel@file_upload.cancel_button": {
          "bindings": [
            {
              "binding_name": "#cancel_button_visible",
              "binding_name_override": "#visible"
            }
          ]
        }
      },
      {
        "continue_cancel@file_upload.continue_or_cancel_button": {
          "bindings": [
            {
              "binding_name": "#warning_button2_visible",
              "binding_name_override": "#visible"
            }
          ]
        }
      }
    ]
  },

  //---------------------------------------------------------------------------
  // Screen and Content
  //---------------------------------------------------------------------------

  "file_upload_content": {
    "type": "panel",
    "controls": [
      {
        "title_panel_content@common_art.title_panel_content": {
          "$splash_text_visible": false,
          "layer": -1
        }
      },
      {
        "content": {
          "type": "panel",
          "size": [ 268, 95 ],
          "controls": [
            {
              "background@common.common_panel": {
                "$dialog_background": "dialog_background_hollow_2",
                "$show_close_button|default": false
              }
            },
            {
              "title@file_upload.upload_title_panel": {
                "layer": 2,
                "size": [ "100% - 14px", 10 ],
                "offset": [ 7, 7 ],
                "anchor_from": "top_left",
                "anchor_to": "top_left"
              }
            },
            {
              "content@file_upload.content_panel": {
                "layer": 2,
                "size": [ "100% - 20px", "100% - 65px" ],
                "offset": [ 10, 23 ],
                "anchor_from": "top_left",
                "anchor_to": "top_left"
              }
            },
            {
              "buttons@file_upload.button_panel": {
                "layer": 2,
                "size": [ "100% - 14px", 30 ],
                "offset": [ 7, -7 ],
                "anchor_from": "bottom_left",
                "anchor_to": "bottom_left"
              }
            }
          ]
        }
      }
    ]
  },

  "file_transmission_screen@common.base_screen": {
    "button_mappings": [
      {
        "from_button_id": "button.menu_cancel",
        "to_button_id": "button.menu_exit",
        "mapping_type": "global"
      },
      {
        "from_button_id": "button.menu_tab_left",
        "to_button_id": "button.menu_tab_left",
        "mapping_type": "global",
        "scope": "view"
      },
      {
        "from_button_id": "button.menu_tab_right",
        "to_button_id": "button.menu_tab_right",
        "mapping_type": "global",
        "scope": "view"
      }
    ],
    "$screen_content": "file_upload.file_upload_content"
  }

}