{
  "namespace": "realmsPlus",

  "realms_plus_pdp_screen@common.base_screen": {
    "$screen_content": "realmsPlus.realmsPlus_main_panel",
    "$header_safezone_control": "common_store.store_top_bar_filler",
    "$header_bar_control": "common_store.store_top_bar",
    "$screen_background_control": "realmsPlus.purple_background",
    "$is_full_screen_layout": true,
    "$fill_alpha": 1,
    "button_mappings": [
      {
        "from_button_id": "button.menu_cancel",
        "to_button_id": "button.menu_exit",
        "mapping_type": "global"
      },
      {
        "from_button_id": "button.controller_secondary_select",
        "to_button_id": "button.search",
        "mapping_type": "global",
        "ignored": "$is_on_3p_server"
      },
      {
        "from_button_id": "button.controller_select",
        "to_button_id": "button.coin_wallet",
        "mapping_type": "global"
      }
    ]
  },

  "purple_background": {
    "type": "image",
    "texture": "textures/ui/purp_bg",
    "tiled": true
  },

  "realmsPlus_main_panel": {
    "type": "panel",
    "controls": [
      {
        "root_panel": {
          "type": "panel",
          "anchor_from": "top_left",
          "anchor_to": "top_left",
          "controls": [
            {
              "main_panel@common_store.store_header_with_coins": {
                "$child_control": "realmsPlus.dialog_content",
                "$back_button_has_title": true,
                "$button_text": "store.realmsPlus"
              }
            }
          ]
        }
      },
      {
        "popup_dialog_factory": {
          "type": "factory",
          "control_ids": {
            "play_on_realm": "@realms_common.popup_dialog__play_on_realm"
          }
        }
      }
    ]
  },

  "dialog_content": {
    "type": "panel",
    "anchor_from": "top_middle",
    "anchor_to": "top_middle",
    "controls": [
      { "selector_area@realmsPlus.selector_area": {} },
      { "content_area@realmsPlus.content_area": {} },
      { "left_right_pane_divider@realmsPlus.left_right_pane_divider": {} }
    ]
  },

  "selector_area": {
    "type": "panel",
    "size": [ "30% - 3px", "100%" ],
    "anchor_from": "top_left",
    "anchor_to": "top_left",
    "layer": 2,
    "focus_container": true,
    "use_last_focus": true,
    "$focus_nagivation_mode_override_down|default": "contained",
    "$focus_nagivation_mode_override_up|default": "contained",
    "$focus_nagivation_mode_override_left|default": "",
    "$focus_nagivation_mode_override_right|default": "",
    "focus_nagivation_mode_down": "$focus_nagivation_mode_override_down",
    "focus_nagivation_mode_up": "$focus_nagivation_mode_override_up",
    "focus_nagivation_mode_left": "$focus_nagivation_mode_override_left",
    "focus_nagivation_mode_right": "$focus_nagivation_mode_override_right",
    "controls": [
      {
        "scrolling_panel@common.scrolling_panel": {
          "$scrolling_content": "realmsPlus.scrollable_selector_area_content",
          "$show_background": false,
          "$scroll_size": [ "5px", "100% - 4px" ],
          "$scroll_bar_left_padding_size": [ 1, 0 ]
        }
      }
    ]
  },

  "scrollable_selector_area_content": {
    "type": "stack_panel",
    "offset": [ 4, 4 ],
    "size": [ "100% - 4px", "100%c" ],
    "controls": [
      { "realmsPlus_toggle@realmsPlus.realmsPlus_toggle": {} },
      { "content_toggle@realmsPlus.content_toggle": {} },
      { "faq_toggle@realmsPlus.faq_toggle": {} },
      {
        "toggle_section_divider@common.section_divider": {
          "$top_padding_size|default": [ "100%", 0 ],
          "$bottom_padding_size|default": [ "100%", 4 ]
        }
      },
      { "buy_now_toggle@realmsPlus.buy_now_toggle": {} }
    ]
  },

  "section_toggle_base@common_toggles.light_text_toggle_collection": {
    "anchor_from": "top_left",
    "anchor_to": "top_left",
    "size": [ "100%", 20 ],
    "$button_size_override": [ "100%", "100% + 1px" ],
    "$button_type_panel": "realmsPlus.tab_button_text",

    "$radio_toggle_group": true,
    "$toggle_name": "navigation_tab",
    "$toggle_group_default_selected": "$realmsPlus_toggle_index",

    "$toggle_tab_focus_binding_type": "global",
    "$toggle_tab_focus_binding_name": "#navigation_tab_focus_precedence",
    "$toggle_on_hover_binding_type": "global",
    "$toggle_on_hover_binding_name": "#toggle_on_hover"
  },

  "tab_button_text@common.minecraftTenLabel": {
    "anchor_from": "left_middle",
    "anchor_to": "left_middle",
    "size": [ "100% - 4px", "default" ],
    "offset": [ 2, 0 ],
    "text": "$button_text",
    "layer": 3,
    "color": "$text_color",
    "alpha": "$content_alpha",

    "$button_text_binding_type|default": "none",
    "$button_text_grid_collection_name|default": "",
    "$button_text_binding_condition|default": "none",

    "bindings": [
      {
        "binding_type": "$button_text_binding_type",
        "binding_condition": "$button_text_binding_condition",
        "binding_collection_name": "$button_text_grid_collection_name",
        "binding_name": "$button_text",
        "binding_name_override": "$button_text"
      }
    ]
  },

  "toggle_base": {
    "type": "stack_panel",
    "size": [ "100%", "100%c" ],
    "controls": [
      {
        "toggle@realmsPlus.section_toggle_base": {
          "$toggle_view_binding_name|default": "",
          "$toggle_group_forced_index|default": "",
          "$button_text|default": ""
        }
      },
      {
        "padding": {
          "type": "panel",
          "size": [ "100%", 4 ]
        }
      }
    ]
  },

  "realmsPlus_toggle@realmsPlus.toggle_base": {
    "$toggle_view_binding_name": "realmsPlus_toggle",
    "$toggle_group_forced_index": "$realmsPlus_toggle_index",
    "$button_text": "store.realmsPlus"
  },

  "content_toggle@realmsPlus.toggle_base": {
    "$toggle_view_binding_name": "content_toggle",
    "$toggle_group_forced_index": "$content_toggle_index",
    "$button_text": "store.realmsPlus.content"
  },

  "faq_toggle@realmsPlus.toggle_base": {
    "$toggle_view_binding_name": "faq_toggle",
    "$toggle_group_forced_index": "$faq_toggle_index",
    "$button_text": "store.realmsPlus.faq"
  },

  "buy_now_toggle@realmsPlus.toggle_base": {
    "$toggle_view_binding_name": "buy_now_toggle",
    "$toggle_group_forced_index": "$buy_now_toggle_index",
    "$button_text": "store.realmsPlus.buyNow",

    "$default_texture": "textures/ui/pink_button_borderless_lighthover",
    "$hover_texture": "textures/ui/pink_button_borderless_lightpressed",
    "$pressed_texture": "textures/ui/pink_button_borderless_lighthover",
    "$pressed_no_hover_texture": "textures/ui/pink_button_borderless_lightpressed",
    "bindings": [
      {
        "binding_name": "#is_not_owned",
        "binding_name_override": "#visible"
      }
    ]
  },

  "left_right_pane_divider": {
    "type": "image",
    "offset": [ "30%", -1 ],
    "size": [ "4px", "100% + 2px" ],
    "anchor_from": "top_left",
    "anchor_to": "top_left",
    "layer": 3,
    "texture": "textures/ui/Banners"
  },

  // right side
  "content_area": {
    "type": "panel",
    "offset": [ -2, 0 ],
    "size": [ "70% - 8px", "100%" ],
    "anchor_from": "top_right",
    "anchor_to": "top_right",
    "layer": 1,

    "focus_container": true,
    "use_last_focus": false,
    "$focus_nagivation_mode_override_down|default": "contained",
    "$focus_nagivation_mode_override_up|default": "contained",
    "$focus_nagivation_mode_override_left|default": "",
    "$focus_nagivation_mode_override_right|default": "",
    "focus_nagivation_mode_down": "$focus_nagivation_mode_override_down",
    "focus_nagivation_mode_up": "$focus_nagivation_mode_override_up",
    "focus_nagivation_mode_left": "$focus_nagivation_mode_override_left",
    "focus_nagivation_mode_right": "$focus_nagivation_mode_override_right",

    "controls": [
      {
        "control": {
          "type": "stack_panel",
          "size": [ "100%", "100%" ],
          "anchor_from": "top_right",
          "anchor_to": "top_right",
          "controls": [
            {
              "scrolling_panel@common.scrolling_panel": {
                "size": [ "100%", "fill" ],
                "$scrolling_content": "realmsPlus.section_content_panels",
                "$show_background": false,
                "$scroll_size": [ "5px", "100% - 8px" ],
                "$scroll_bar_left_padding_size": [ 4, 0 ]
              }
            }
          ]
        }
      }
    ]
  },

  "section_content_panels": {
    "type": "stack_panel",
    "anchor_from": "top_left",
    "anchor_to": "top_left",
    "size": [ "100%", "100%c" ],
    "factory": {
      "name": "toggle_section_factory",
      "control_ids": {
        "realmsPlus_tab": "@realmsPlus_landing.landing_content_section",
        "content_tab": "@realmsPlus_content.realmsPlus_content_section",
        "faq_tab": "@realmsPlus_faq.faq_content_section",
        "buy_now_tab": "@realmsPlus.buy_now_content_section"
      }
    },
    "bindings": [
      {
        "binding_name": "#section_content",
        "binding_name_override": "#collection_length"
      }
    ]
  },

  "content_section_top_padding": {
    "type": "panel",
    "size": [ "100%", 4 ]
  },

  "section_base": {
    "type": "stack_panel",
    "size": [ "100%", "100%c" ]
  },

  "buy_now_content_section@realmsPlus.section_base": {
    "controls": [
      {
        "content_section_top_padding@realmsPlus.content_section_top_padding": {}
      },
      {
        "content@realmsPlus_buy.buy_now_content": {}
      }
    ]
  },

  "realms_default_animation": {
    "anim_type": "flip_book",
    "initial_uv": [ 0, 0 ],
    "frame_count": 16,
    "frame_step": 19,
    "fps": 10,
    "reversible": false
  },

  "realms_hover_animation": {
    "anim_type": "flip_book",
    "initial_uv": [ 0, 0 ],
    "frame_count": 16,
    "frame_step": 19,
    "fps": 8,
    "reversible": false
  },

  "markdown_background_animated": {
    "type": "panel",
    "size": [ "100%c", "100% + 4px" ],
    "anchor_from": "left_middle",
    "anchor_to": "left_middle",
    "controls": [
      {
        "realms_banner@realmsPlus.markdown_background": {
          "size": [ "100%c", "100%" ],
          "$banner_size": [ "13px", "100%" ],
          "$triangle_offset": [ 0, 0 ],
          "layer": 9
        }
      },
      {
        "realms_plus_normal": {
          "type": "image",
          "texture": "textures/ui/realms_plus_normal",
          "size": [ 19, 19 ],
          "uv_size": [ 19, 19 ],
          "uv": "@realmsPlus.realms_default_animation",
          "disable_anim_fast_forward": true,
          "anchor_from": "bottom_left",
          "anchor_to": "bottom_left",
          "layer": 15,
          "offset": [ -2, 0 ],
          "ignored": "$hover_state"
        }
      },
      {
        "realms_plus_hover": {
          "type": "image",
          "texture": "textures/ui/realms_plus_hover",
          "size": [ 19, 19 ],
          "uv_size": [ 19, 19 ],
          "uv": "@realmsPlus.realms_default_animation",
          "disable_anim_fast_forward": true,
          "anchor_from": "bottom_left",
          "anchor_to": "bottom_left",
          "layer": 15,
          "offset": [ -2, 0 ],
          "ignored": "(not $hover_state)"
        }
      }
    ]
  },      

  "markdown_background": {
    "type": "stack_panel",
    "orientation": "horizontal",
    "size": [ "100%c", "100%" ],
    "anchor_from": "bottom_left",
    "anchor_to": "bottom_left",
    "$banner_size|default": [ "100%c + 4px", "100%" ],
    "$icon_color": "$store_sales_banner_text_color",
    "$default_state|default": false,
    "$hover_state|default": false,
    "$pressed_state|default": false,
    "$banner_texture": "textures/ui/pinkflag",
    "$triangle_texture": "textures/ui/pinkflagtriangle",
    "$triangle_offset": [ -1, 0 ],
    "variables": [
      {
        "requires": "$default_state",
        "$banner_texture": "textures/ui/pink_button_borderless_lighthoverflag",
        "$triangle_texture": "textures/ui/pinkflagtrianglebeveldefault"
      },
      {
        "requires": "$hover_state",
        "$banner_texture": "textures/ui/pink_button_borderless_lighthoverflag",
        "$triangle_texture": "textures/ui/pinkflagtrianglebeveldefault"
      },
      {
        "requires": "$pressed_state",
        "$banner_texture": "textures/ui/pink_button_borderless_lightpressedflag",
        "$triangle_texture": "textures/ui/pinkflagtrianglebevelpress",
        "$banner_offset": [ 0, -1 ],
        "$triangle_offset": [ -1, -1 ]
      }
    ],
    "controls": [
      {
        "banner_panel": {
          "type": "panel",
          "size": [ "100%c", "100%" ],
          "controls": [
            {
              "banner@common_store.markdown_banner": {
                "size": "$banner_size",
                "layer": 1,
                "$banner_offset|default": [ 0, 0 ],
                "offset": "$banner_offset",
                "$pack_icon_size|default": [ 5.5, 7 ],
                "controls": [
                  {
                    "realms_icon": {
                      "type": "image",
                      "size": "$pack_icon_size",
                      "layer": 1,
                      "texture": "textures/ui/realmsIcon",
                      "bilinear": true
                    }
                  }
                ]
              }
            }
          ]
        }
      },
      {
        "triangle_panel": {
          "type": "panel",
          "size": [ "100%c", "100%" ],
          "controls": [
            {
              "triangle@common_store.markdown_triangle": {
                "size": [ "50%y", "100%" ],
                "offset": "$triangle_offset",
                "layer": 2
              }
            }
          ]
        }
      }
    ]
  },

  "empty_label": {
    "type": "panel",
    "size": [ 0, "100%" ]
  }

}
