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

{
  "namespace": "xbl_report_user",

  "hammer_l_icon": {
    "type": "image",
    "texture": "textures/ui/hammer_l",
    "size": [ 15, 15 ]
  },

  "hammer_r_icon": {
    "type": "image",
    "texture": "textures/ui/hammer_r",
    "size": [ 15, 15 ]
  },

  "hammer_l_disabled_icon": {
    "type": "image",
    "texture": "textures/ui/hammer_l_disabled",
    "size": [ 15, 15 ]
  },

  "hammer_r_disabled_icon": {
    "type": "image",
    "texture": "textures/ui/hammer_r_disabled",
    "size": [ 15, 15 ]
  },

  "report_dropdown_panel": {
    "type": "stack_panel",
    "size": [ "100% - 12px", "100%" ],
    "orientation": "horizontal",
    "controls": [
      {
        "label_panel": {
          "type": "panel",
          "size": [ "fill", "100%" ],
          "controls": [
            {
              "report_label@xbl_report_user.report_label": {}
            }
          ]
        }
      },
      {
        "arrow_panel": {
          "type": "panel",
          "layer": 1,
          "size": [ "100%c", "100%" ],
          "controls": [
            {
              "arrow@settings_common.arrow_image": {}
            }
          ]
        }
      }
    ]
  },

  "report_label@common.new_button_label": {
    "layer": 2,
    "anchor_from": "left_middle",
    "anchor_to": "left_middle",
    "size": [ "100%", "default" ],
    "text": "$options_dropdown_toggle_label_binding",
    "bindings": [
      {
        "binding_name": "$options_dropdown_toggle_label_binding"        
      }
    ]
  },

  "dialog_content": {
    "type": "stack_panel",
    "size": [ "100% - 4px", "100% - 4px" ],
    "controls": [
      {
        "padding_0": {
          "type": "panel",
          "size": [ "100%", 1 ]
        }
      },
      {
        "dropdown_visibility_panel": {
          "type": "panel",
          "size": [ "100%", "100%c - 2px" ],
          "controls": [
            {
              "friends_dropdown@settings_common.option_dropdown": {
                "$button_type_panel": "xbl_report_user.report_dropdown_panel",
                "$show_option_label": false,
                "$option_label": "#report_reason_dropdown_toggle_label",
                "$dropdown_content": "xbl_report_user.report_dropdown_content",
                "$dropdown_area": "main_panel",
                "$dropdown_name": "report_reason_dropdown",
                "$options_dropdown_toggle_label_binding": "#report_reason_dropdown_toggle_label",
                "$dropdown_scroll_content_size": [ "100%", 118 ]
              }
            }
          ],
          "bindings": [
            {
              "binding_name": "#show_reason",
              "binding_name_override": "#visible"
            }
          ]
        }
      },
      {
        "where_dropdown_visibility_panel": {
          "type": "panel",
          "size": [ "100%", "100%c - 2px" ],
          "controls": [
            {
              "friends_dropdown@settings_common.option_dropdown": {
                "$button_type_panel": "xbl_report_user.report_dropdown_panel",
                "$show_option_label": false,
                "$option_label": "#report_area_dropdown_toggle_label",
                "$dropdown_content": "xbl_report_user.report_where_dropdown_content",
                "$dropdown_area": "main_panel",
                "$dropdown_name": "report_area_dropdown",
                "$options_dropdown_toggle_label_binding": "#report_area_dropdown_toggle_label",
                "$dropdown_scroll_content_size": [ "100%", 118 ]
              }
            }
          ],
          "bindings": [
            {
              "binding_name": "(not #show_reason)",
              "binding_name_override": "#visible"
            }
          ]
        }
      },
      {
        "where_report_description": {
          "type": "label",
          "text": "xbox.report.whereReportDescription",
          "color": "$body_text_color",
          "size": [ "100%", "fill" ],
          "bindings": [
            {
              "binding_name": "(not #show_reason)",
              "binding_name_override": "#visible"
            }
          ]
        }    
      },
      {
        "text_edit_box@common.scrollable_multiline_text_edit_box": {
          "constrain_to_rect": false,
          "enabled_newline": true,
          "$text_box_name": "report_reason_text_box",
          "$place_holder_text": "xbox.report.optionalText",
          "$text_edit_box_label_anchor_point": "top_left",
          "$text_edit_box_label_offset": [ 2, 2 ],
          "$text_edit_box_label_size": [ "100% - 6px", "default" ],
          "$place_holder_text_color": "$place_holder_text_color",
          "max_length": 1000, // Max # of W's that can fit in the text box
          "size": [ "100%", "fill" ],
          "property_bag": {
            "#property_field": "#additional_report_notes"
          },
          "bindings": [
            {
              "binding_name": "#show_reason",
              "binding_name_override": "#visible"
            }
          ]
        }
      },
      {
        "padding_4": {
          "type": "panel",
          "size": [ "100%", 2 ]
        }
      },
      {
        "next_button@common_buttons.dark_content_button": {
          "size": [ "100%", 30 ],
          "$pressed_button_name": "button.next",
          "$button_content": "xbl_report_user.next_button_content",
          "bindings": [
            {
              "binding_name": "#area_selected",
              "binding_name_override": "#enabled"
            },
            {
              "binding_name": "(not #show_reason)",
              "binding_name_override": "#visible"
            }
          ]
        }
      },
	  
      {
        "report_button@common_buttons.dark_content_button": {
          "size": [ "100%", 30 ],
          "$pressed_button_name": "button.report",
          "$button_content": "xbl_report_user.report_button_content",
          "bindings": [
            {
              "binding_name": "#reason_selected",
              "binding_name_override": "#enabled"
            },
            {
              "binding_name": "#show_reason",
              "binding_name_override": "#visible"
            }
          ]
        }
      }
    ]
  },
  "next_button_content": {
    "type": "panel",
    "size": [ "100% - 8px", "100%" ],
    "controls": [
      {
        "next_label": {
          "type": "panel",
          "size": [ "fill", "100%" ],
          "controls": [
            {
              "next_label": {
                "type": "label",
                "size": [ "default", "default" ],
                "color": "$body_text_color",
                "text": "gui.next"
              }
            }
          ]
        }
      }
    ],
    "bindings": [
      {
        "binding_name": "(not #show_reason)",
        "binding_name_override": "#visible"
      }
    ]
  },
  "report_button_content": {
    "type": "stack_panel",
    "orientation": "horizontal",
    "size": [ "100% - 8px", "100%" ],
    "controls": [
      {
        "hammer_icon_panel_l": {
          "type": "panel",
          "size": [ "100%c", "100%" ],
          "controls": [
            {
              "hammer@xbl_report_user.hammer_l_icon": {
                "bindings": [
                  {
                    "binding_name": "#reason_selected",
                    "binding_name_override": "#visible"
                  }
                ]
              }
            },
            {
              "hammer_disabled@xbl_report_user.hammer_l_disabled_icon": {
                "bindings": [
                  {
                    "binding_name": "(not #reason_selected)",
                    "binding_name_override": "#visible"
                  }
                ]
              }
            }
          ]
        }
      },
      {
        "report_label": {
          "type": "panel",
          "size": [ "fill", "100%" ],
          "controls": [
            {
              "report_label": {
                "type": "label",
                "size": [ "default", "default" ],
                "color": "$body_text_color",
                "text": "xbox.profile.report"
              }
            }
          ]
        }
      },
      {
        "hammer_icon_panel_r": {
          "type": "panel",
          "size": [ "100%c", "100%" ],
          "controls": [
            {
              "hammer@xbl_report_user.hammer_r_icon": {
                "bindings": [
                  {
                    "binding_name": "#reason_selected",
                    "binding_name_override": "#visible"
                  }
                ]
              }
            },
            {
              "hammer_disabled@xbl_report_user.hammer_r_disabled_icon": {
                "bindings": [
                  {
                    "binding_name": "(not #reason_selected)",
                    "binding_name_override": "#visible"
                  }
                ]
              }
            }
          ]
        }
      }
    ],
    "bindings": [
      {
        "binding_name": "#show_reason",
        "binding_name_override": "#visible"
      }
    ]
  },

  "report_dropdown_content@settings_common.option_radio_dropdown_group": {
    "size": [ "100% - 5px", "100%c" ],
    "$show_option_label": false,
    "$radio_buttons": [
      {
        "cheating@settings_common.radio_with_label": {
          "min_size": [ "100%", 22 ],
          "$toggle_state_binding_name": "#cheating",
          "$radio_label_text": "xbox.report.cheating"
        }
      },
      {
        "player_name_gamertag@settings_common.radio_with_label": {
          "min_size": [ "100%", 22 ],
          "$toggle_state_binding_name": "#name_or_gametag",
          "$radio_label_text": "xbox.report.nameOrGamertag"
        }
      },
      {
        "quitting@settings_common.radio_with_label": {
          "min_size": [ "100%", 22 ],
          "$toggle_state_binding_name": "#quitting_early",
          "$radio_label_text": "xbox.report.quittingEarly"
        }
      },
      {
        "unsporting@settings_common.radio_with_label": {
          "min_size": [ "100%", 22 ],
          "$toggle_state_binding_name": "#unsporting_behavior",
          "$radio_label_text": "xbox.report.unsportingBehavior"
        }
      },
      {
        "voice_communication@settings_common.radio_with_label": {
          "min_size": [ "100%", 22 ],
          "$toggle_state_binding_name": "#voice_communication",
          "$radio_label_text": "xbox.report.voiceCommunication"
        }
      },
      {
        "child_sexual_exploitation_or_abuse@settings_common.radio_with_label": {
          "min_size": [ "100%", 22 ],
          "$toggle_state_binding_name": "#child_sexual_exploitation_or_abuse",
          "$radio_label_text": "xbox.report.childSexualExploitationOrAbuse"
        }
      },
      {
        "terrorism_or_violent_extremism@settings_common.radio_with_label": {
          "min_size": [ "100%", 22 ],
          "$toggle_state_binding_name": "#terrorism_or_violent_extremism",
          "$radio_label_text": "xbox.report.terrorismOrViolentExtremism"
        }
      },
      {
        "hate_speech@settings_common.radio_with_label": {
          "min_size": [ "100%", 22 ],
          "$toggle_state_binding_name": "#hate_speech",
          "$radio_label_text": "xbox.report.hateSpeech"
        }
      },
      {
        "imminent_harm@settings_common.radio_with_label": {
          "min_size": [ "100%", 22 ],
          "$toggle_state_binding_name": "#imminent_harm",
          "$radio_label_text": "xbox.report.imminentHarm"
        }
      },
      {
        "non-consensual_intimate_imagery@settings_common.radio_with_label": {
          "min_size": [ "100%", 22 ],
          "$toggle_state_binding_name": "#non-consensual_intimate_imagery",
          "$radio_label_text": "xbox.report.nonConsensualIntimateImagery"
        }
      }
    ]
  },
  "report_where_dropdown_content@settings_common.option_radio_dropdown_group": {
    "size": [ "100%", "100%c" ],
    "$show_option_label": false,
    "$radio_buttons": [
      {
        "chat@settings_common.radio_with_label": {
          "min_size": [ "100%", 22 ],
          "$toggle_state_binding_name": "#chat",
          "$radio_label_text": "xbox.report.area.chat"
        }
      },
      {
        "skin@settings_common.radio_with_label": {
          "min_size": [ "100%", 22 ],
          "$toggle_state_binding_name": "#skin",
          "$radio_label_text": "xbox.report.area.skin"
        }
      },
      {
        "gameplay@settings_common.radio_with_label": {
          "min_size": [ "100%", 22 ],
          "$toggle_state_binding_name": "#gameplay",
          "$radio_label_text": "xbox.report.area.gameplay"
        }
      },
      {
        "ingame@settings_common.radio_with_label": {
          "min_size": [ "100%", 22 ],
          "$toggle_state_binding_name": "#ingame",
          "$radio_label_text": "xbox.report.area.ingame"
        }
      },
      {
        "other@settings_common.radio_with_label": {
          "min_size": [ "100%", 22 ],
          "$toggle_state_binding_name": "#other",
          "$radio_label_text": "xbox.report.area.other"
        }
      }
    ]
  },

  "dialog@common_dialogs.main_panel_no_buttons": {
    "$text_name": "$report_gamertag",
    "$child_control": "xbl_report_user.dialog_content",
    "size": [ 190, 175 ]
  },

  "gamepad_helpers": {
    "type": "panel",
    "layer": 2,
    "controls": [
      {
        "gamepad_helper_a@common.gamepad_helper_a": {
          "anchor_from": "bottom_middle",
          "anchor_to": "bottom_middle",
          "offset": [ "-10%", "-5%" ]
        }
      },
      {
        "gamepad_helper_b@common.gamepad_helper_b": {
          "anchor_from": "bottom_middle",
          "anchor_to": "bottom_middle",
          "offset": [ "10%", "-5%" ]
        }
      }
    ]
  },

  // -----------------------------------------------
  //
  //    screen
  //
  // -----------------------------------------------
  "xbl_report_user_screen@common.base_screen": {
    "button_mappings": [
      {
        "from_button_id": "button.menu_cancel",
        "to_button_id": "button.menu_exit",
        "mapping_type": "global"
      }
    ],
    "$screen_content": "xbl_report_user.xbl_report_user_screen_content"
  },

  "xbl_report_user_screen_content": {
    "type": "panel",
    "controls": [
      { "gamepad_helpers@xbl_report_user.gamepad_helpers": {} },
      { "main_panel@xbl_report_user.dialog": { "layer": 1 } }
    ]
  }
}
