{
  "namespace": "store_layout",

  //--------------------------------------------------------------------------------
  // Content
  //--------------------------------------------------------------------------------

  "today_gift_icon": {
    "type": "image",
    "texture": "textures/ui/gift_featured",
    "layer": 1
  },

  "watch": {
    "type": "image",
    "size": [ 11, 11 ],
    "texture": "textures/ui/timer"
  },

  "today_gift_icon_panel": {
    "type": "panel",
    "controls": [
      {
        "wrapped_gift@store_layout.today_gift_icon": {
          "layer": 1,
          "bindings": [
            {
              "binding_type": "$store_factory_binding_type",
              "binding_collection_name": "$store_factory_collection_name",
              "binding_name": "#promo_wrapped",
              "binding_name_override": "#visible"
            }
          ]
        }
      },
      {
        "unwrapped_gift": {
          "type": "image",
          "layer": 1,
          "bindings": [
            {
              "binding_type": "$store_factory_binding_type",
              "binding_collection_name": "$store_factory_collection_name",
              "binding_name": "(not #promo_wrapped)",
              "binding_name_override": "#visible"
            },
            {
              "binding_type": "$store_factory_binding_type",
              "binding_collection_name": "$store_factory_collection_name",
              "binding_name": "#promo_texture_path",
              "binding_name_override": "#texture"
            },
            {
              "binding_type": "$store_factory_binding_type",
              "binding_collection_name": "$store_factory_collection_name",
              "binding_name": "#promo_texture_file_system",
              "binding_name_override": "#texture_file_system"
            }
          ]
        }
      },
      {
        "today_label": {
          "type": "label",
          "size": [ "default", "default" ],
          "max_size": [ "100% - 4px", 20 ],
          "layer": 2,
          "offset": [ -2, -2 ],
          "anchor_from": "bottom_right",
          "anchor_to": "bottom_right",
          "text": "store.promo.today",
          "text_alignment": "right",
          "font_type": "smooth",
          "color": "$body_text_color",
          "bindings": [
            {
              "binding_type": "$store_factory_binding_type",
              "binding_collection_name": "$store_factory_collection_name",
              "binding_name": "#promo_wrapped",
              "binding_name_override": "#visible"
            }
          ]
        }
      },
      {
        "checkbox@store_layout.promo_checkbox": {
          "$binding_type": "global",
          "$binding_name": "#today_promo_owned",
          "layer": 3,
          "bindings": [
            {
              "binding_type": "$store_factory_binding_type",
              "binding_collection_name": "$store_factory_collection_name",
              "binding_name": "(not #promo_wrapped)",
              "binding_name_override": "#visible"
            }
          ]
        }
      }
    ]
  },

  "checkbox_checked@common.focus_border_white": {
    "controls": [
      {
        "checkmark": {
          "size": [ "100% - 2px", "100% - 2px" ],
          "type": "image",
          "layer": 1,
          "texture": "textures/ui/check_green_white"
        }
      }
    ]
  },

  "promo_checkbox": {
    "type": "panel",
    "size": [ 10, 10 ],
    "offset": [ 3, -3 ],
    "anchor_from": "bottom_left",
    "anchor_to": "bottom_left",
    "$binding_collection_name|default": "",
    "$binding_type|default": "none",
    "$binding_name|default": "",
    "controls": [
      {
        "checked@store_layout.checkbox_checked": {
          "bindings": [
            {
              "binding_type": "$store_factory_collection_details",
              "binding_collection_name": "$store_factory_collection_name",
              "binding_collection_prefix": "$store_factory_collection_prefix"
            },
            {
              "binding_name": "$binding_name",
              "binding_name_override": "#visible",
              "binding_type": "$binding_type",
              "binding_collection_name": "$binding_collection_name"
            }
          ]
        }
      }
    ]
  },

  "promo_loading_panel": {
    "type": "panel",
    "size": [ "100%", "100%c" ],
    "controls": [
      {
        "promo_row_progress_loading@common_store.progress_loading": {
          "size": [ "100% - 4px", "7.8261%x + 10.4349px" ],
          "layer": 100, // Make this on top
          "bindings": [
            {
              "binding_name": "(not #promo_row_visible)",
              "binding_name_override": "#visible"
            }
          ]
        }
      }
    ]
  },

  "promo_row_panel": {
    "type": "panel",
    "size": [ "100%", "100%cm + 4px" ],
    "controls": [
      {
        "promo_row_content_stack": {
          "type": "stack_panel",
          "size": [ "100%", "100%c" ],
          "clip_state_change_event": "$store_factory_clipping_event",
          "controls": [
            {
              "promo_row_label_panel": {
                "type": "panel",
                "size": [ "100%", 12 ],
                "controls": [
                  {
                    "promo_panel_label@store_layout.promo_panel_label": {}
                  }
                ]
              }
            },
            {
              "promo_grid_panel": {
                "type": "panel",
                "size": [ "100%", "100%c" ],
                "controls": [
                  {
                    "promo_row_with_featured_offer_grid_panel@store_layout.promo_row_with_featured_offer_grid_panel": {
                      "bindings": [
                        {
                          "binding_type": "$store_factory_binding_type",
                          "binding_collection_name": "$store_factory_collection_name",
                          "binding_name": "#promo_offer_today",
                          "binding_name_override": "#visible"
                        }
                      ]
                    }
                  },
                  {
                    "promo_row_grid_panel@store_layout.promo_row_grid_panel": {
                      "bindings": [
                        {
                          "binding_type": "$store_factory_binding_type",
                          "binding_collection_name": "$store_factory_collection_name",
                          "binding_name": "(not #promo_offer_today)",
                          "binding_name_override": "#visible"
                        }
                      ]
                    }
                  }
                ]
              }
            }
          ],
          "bindings": [
            {
              "binding_type": "$store_factory_collection_details",
              "binding_collection_name": "$store_factory_collection_name",
              "binding_collection_prefix": "$store_factory_collection_prefix"
            },
            {
              "binding_type": "$store_factory_binding_type",
              "binding_collection_name": "$store_factory_collection_name",
              "binding_name": "#promo_row_visible",
              "binding_name_override": "#visible"
            }
          ]
        }
      },
      {
        "promo_loading_panel": {
          "type": "panel",
          "size": [ "100%", "100%c" ],
          "controls": [
            {
              "promo_row_progress_loading@common_store.progress_loading": {
                "size": [ "100% - 4px", "7.8261%x + 10.4349px" ],
                "layer": 100, // Make this on top
                "bindings": [
                  {
                    "binding_type": "$store_factory_binding_type",
                    "binding_collection_name": "$store_factory_collection_name",
                    "binding_name": "#promo_row_loading_visible",
                    "binding_name_override": "#visible"
                  }
                ]
              }
            }
          ]
        }
      }
    ]
  },

  "scrolling_content_stack": {
    "anchor_from": "top_left",
    "anchor_to": "top_left",
    "type": "stack_panel",
    "orientation": "vertical",
    "size": [ "100%", "100%c" ],
    "controls": [
      {
        "padding_0": {
          "type": "panel",
          "size": [ "100%", 4 ]
        }
      },
      {
        "store_factory@common_store.store_section_factory": {}
      },
      {
        "footer@common_store.footer": {}
      }
    ]
  },

  "promo_panel_label": {
    "type": "stack_panel",
    "size": [ "100%c", "100%" ],
    "orientation": "horizontal",
    "controls": [
      {
        "timer_1@store_layout.watch": {}
      },
      {
        "padding_0": {
          "type": "panel",
          "size": [ 2, "100%" ]
        }
      },
      {
        "label_panel": {
          "type": "panel",
          "size": [ "100%c", "100%" ],
          "controls": [
            {
              "promo_label": {
                "type": "label",
                "size": [ "default", "default" ],
                "text": "#promo_row_text",
                "color": "$body_text_color",
                "bindings": [
                  {
                    "binding_type": "$store_factory_binding_type",
                    "binding_collection_name": "$store_factory_collection_name",
                    "binding_name": "#promo_row_text"
                  }
                ]
              }
            }
          ]
        }
      },
      {
        "padding_1": {
          "type": "panel",
          "size": [ 2, "100%" ]
        }
      },
      {
        "timer_2@store_layout.watch": {}
      }
    ]
  },

  "future_promo_image_with_border": {
    "type": "panel",
    "controls": [
      {
        "image": {
          "type": "image",
          "size": [ "100% - 2px", "100% - 2px" ],
          "texture": "textures/ui/gift_square",
          "layer": 2
        }
      },
      {
        "date": {
          "type": "label",
          "size": [ "100% - 2px", "default" ],
          "ignored": "$default_state",
          "offset": [ 0, -3 ],
          "color": "$body_text_color",
          "font_type": "smooth",
          "text": "#promo_unlock_date",
          "anchor_from": "bottom_middle",
          "anchor_to": "bottom_middle",
          "text_alignment": "center",
          "layer": 3,
          "bindings": [
            {
              "binding_type": "$store_factory_collection_details",
              "binding_collection_name": "$store_factory_collection_name",
              "binding_collection_prefix": "$store_factory_collection_prefix"
            },
            {
              "binding_type": "collection",
              "binding_collection_name": "future_promo_collection",
              "binding_name": "#promo_unlock_date"
            }
          ]
        }
      },
      {
        "border@common_buttons.focus_border": {
          "size": [ "100%", "100%" ],
          "color": "$border_color",
          "layer": 4
        }
      }
    ]
  },

  "future_promo_button_panel": {
    "type": "panel",
    "size": [ "100%c + 2px", "100%" ],
    "anchor_from": "left_middle",
    "anchor_to": "left_middle",
    "controls": [
      {
        "future_promo_button@common_buttons.single_image_with_border_button": {
          "size": [ "100%y", "100%" ],
          "$pressed_button_name": "button.future_promo",
          "$button_content": "store_layout.future_promo_image_with_border",
          "$button_content_size": [ "100%", "100%" ],
          "$button_pressed_offset": [ 0, 0 ],
          "anchor_from": "right_middle",
          "anchor_to": "right_middle",
          "$focus_override_down": "feature_key_art_id",
          "bindings": [
            {
              "binding_type": "$store_factory_collection_details",
              "binding_collection_name": "$store_factory_collection_name",
              "binding_collection_prefix": "$store_factory_collection_prefix"
            },
            {
              "binding_type": "collection",
              "binding_collection_name": "future_promo_collection",
              "binding_name": "#promo_grid_button_focus_id",
              "binding_name_override": "#focus_identifier"
            },
            {
              "binding_type": "collection",
              "binding_collection_name": "future_promo_collection",
              "binding_name": "#promo_grid_button_focus_left",
              "binding_name_override": "#focus_change_left"
            },
            {
              "binding_type": "collection",
              "binding_collection_name": "future_promo_collection",
              "binding_name": "#promo_grid_button_focus_right",
              "binding_name_override": "#focus_change_right"
            }
          ]
        }
      }
    ]
  },

  "past_promo_button_content": {
    "type": "panel",
    "controls": [
      {
        "image": {
          "type": "image",
          // In order to clip the image into a square we need it to draw as if given more space,
          // otherwise it will auto-size itself to the smaller space before clipping is applied.
          "size": [ "177.7777%y", "100%" ],
          "layer": 1,
          "clip_direction": "left",
          "clip_pixelperfect": true,
          "clip_ratio": 0.4376,
          "anchor_from": "left_middle",
          "anchor_to": "left_middle",
          "controls": [
            {
              "checkbox@store_layout.promo_checkbox": {
                "offset": [ 3, -3 ],
                "$binding_collection_name": "past_promo_collection",
                "$binding_type": "collection",
                "$binding_name": "#past_promo_owned",
                "layer": 3
              }
            }
          ],
          "bindings": [
            {
              "binding_type": "$store_factory_collection_details",
              "binding_collection_name": "$store_factory_collection_name",
              "binding_collection_prefix": "$store_factory_collection_prefix"
            },
            {
              "binding_name": "#past_promo_texture_path",
              "binding_name_override": "#texture",
              "binding_type": "collection",
              "binding_collection_name": "past_promo_collection"
            },
            {
              "binding_name": "#past_promo_texture_file_system",
              "binding_name_override": "#texture_file_system",
              "binding_type": "collection",
              "binding_collection_name": "past_promo_collection"
            }
          ]
        }
      },
      {
        "saturation": {
          "size": [ "100% + 1px", "100% + 1px" ],
          "type": "image",
          "texture": "textures/ui/screen_background",
          "layer": 2,
          "alpha": 0.75,
          "bindings": [
            {
              "binding_type": "$store_factory_collection_details",
              "binding_collection_name": "$store_factory_collection_name",
              "binding_collection_prefix": "$store_factory_collection_prefix"
            },
            {
              "binding_name": "(not #past_promo_owned)",
              "binding_name_override": "#visible",
              "binding_type": "collection",
              "binding_collection_name": "past_promo_collection"
            }
          ]
        }
      },
      {
        "date": {
          "type": "label",
          "size": [ "100% - 2px", "default" ],
          "ignored": "$default_state",
          "offset": [ 0, 3 ],
          "color": "$body_text_color",
          "font_type": "smooth",
          "text": "#promo_unlock_date",
          "anchor_from": "top_middle",
          "anchor_to": "top_middle",
          "text_alignment": "center",
          "layer": 5,
          "bindings": [
            {
              "binding_type": "$store_factory_collection_details",
              "binding_collection_name": "$store_factory_collection_name",
              "binding_collection_prefix": "$store_factory_collection_prefix"
            },
            {
              "binding_type": "collection",
              "binding_collection_name": "past_promo_collection",
              "binding_name": "#promo_unlock_date"
            }
          ]
        }
      },
      {
        "border@common_buttons.focus_border": {
          "size": [ "100% + 2px", "100% + 2px" ],
          "color": "$border_color",
          "layer": 6
        }
      }
    ]
  },

  "past_promo_button@common_buttons.single_image_with_border_button": {
    "$pressed_button_name": "button.past_promo",
    "$button_content": "store_layout.past_promo_button_content",
    "$button_pressed_offset": [ 0, 0 ],
    "$button_content_size": [ "100% - 2px", "100% - 2px" ],
    "$border_visible": false, // The border from the button template doesn't draw on top of the image and gets cut off sometimes, working around this by setting our own
    "$focus_override_down": "feature_key_art_id",
    "bindings": [
      {
        "binding_type": "$store_factory_collection_details",
        "binding_collection_name": "$store_factory_collection_name",
        "binding_collection_prefix": "$store_factory_collection_prefix"
      },
      {
        "binding_type": "collection",
        "binding_collection_name": "past_promo_collection",
        "binding_name": "#promo_grid_button_focus_id",
        "binding_name_override": "#focus_identifier"
      },
      {
        "binding_type": "collection",
        "binding_collection_name": "past_promo_collection",
        "binding_name": "#promo_grid_button_focus_left",
        "binding_name_override": "#focus_change_left"
      },
      {
        "binding_type": "collection",
        "binding_collection_name": "past_promo_collection",
        "binding_name": "#promo_grid_button_focus_right",
        "binding_name_override": "#focus_change_right"
      }
    ]
  },

  "past_promo_image_with_border": {
    "type": "panel",
    "size": [ "100%c + 2px", "100%" ],
    "controls": [
      {
        "button@store_layout.past_promo_button": {
          "size": [ "100%y", "100%" ],
          "anchor_from": "left_middle",
          "anchor_to": "left_middle",
          "layer": 1
        }
      }
    ]
  },

  "promo_row_with_featured_offer_grid_panel": {
    "type": "stack_panel",
    "size": [ "100% - 4px", "7.8261%x - 1.566px" ], // Y = (100%x - padding/border of key art)/(11 * 100% + 177.78%) //1.5652px
    "orientation": "horizontal",
    "controls": [
      {
        "past_promo_row_grid": {
          "type": "grid",
          // At "default" or "100%" on the X this will wrap the last offer in the row on a couple select screen sizes, despite there being enough room in layout.
          // This is a dirty hack to get around that issue, once the issue has been resolved we can revert this back to "default" size on the X.
          "size": [ "100.01%c", "100%" ],
          "grid_item_template": "store_layout.past_promo_image_with_border",
          "grid_dimension_binding": "#past_promo_row_grid_dimension",
          "collection_name": "past_promo_collection",
          "bindings": [
            {
              "binding_type": "$store_factory_binding_type",
              "binding_collection_name": "$store_factory_collection_name",
              "binding_name": "#past_promo_row_grid_dimension"
            }
          ]
        }
      },
      {
        "today_promo_offer@common_buttons.single_image_with_border_button": {
          "size": [ "177.78%y - 1.5556px", "100%" ],
          "$pressed_button_name": "button.unwrap_promo",
          "$button_content": "store_layout.today_gift_icon_panel",
          "$button_pressed_offset": [ 0, 0 ],
          "$button_content_size": [ "177.78%y", "100% - 2px" ],
          "$focus_id": "promo_offer_today",
          "$focus_override_down": "feature_key_art_id",
          "bindings": [
            {
              "binding_type": "$store_factory_binding_type",
              "binding_collection_name": "$store_factory_collection_name",
              "binding_name": "#promo_offer_today",
              "binding_name_override": "#visible"
            }
          ]
        }
      },
      {
        "future_promo_row_grid": {
          "type": "grid",
          // At "default" or "100%" on the X this will wrap the last offer in the row on a couple select screen sizes, despite there being enough room in layout.
          // This is a dirty hack to get around that issue, once the issue has been resolved we can revert this back to "default" size on the X.
          "size": [ "100.01%c", "100%" ],
          "grid_item_template": "store_layout.future_promo_button_panel",
          "grid_dimension_binding": "#future_promo_row_grid_dimension",
          "collection_name": "future_promo_collection",
          "bindings": [
            {
              "binding_type": "$store_factory_binding_type",
              "binding_collection_name": "$store_factory_collection_name",
              "binding_name": "#future_promo_row_grid_dimension"
            }
          ]
        }
      }
    ]
  },

  "promo_row_grid_panel": {
    "type": "panel",
    "size": [ "100% - 4px", "8.333%x - 1.8333px" ], // Y = (100%x - padding/border of key art)/(12 * 100%) //1.5652px
    "controls": [
      {
        "past_promo_row_grid": {
          "type": "grid",
          "size": [ "default", "100%" ],
          "anchor_from": "left_middle",
          "anchor_to": "left_middle",
          "grid_item_template": "store_layout.past_promo_image_with_border",
          "grid_dimension_binding": "#past_promo_row_grid_dimension",
          "collection_name": "past_promo_collection",
          "bindings": [
            {
              "binding_name": "#past_promo_row_grid_dimension"
            }
          ]
        }
      },
      {
        "future_promo_row_grid": {
          "type": "grid",
          "size": [ "default", "100%" ],
          "anchor_from": "right_middle",
          "anchor_to": "right_middle",
          "grid_item_template": "store_layout.future_promo_button_panel",
          "grid_dimension_binding": "#future_promo_row_grid_dimension",
          "collection_name": "future_promo_collection",
          "bindings": [
            {
              "binding_type": "$store_factory_binding_type",
              "binding_collection_name": "$store_factory_collection_name",
              "binding_name": "#future_promo_row_grid_dimension"
            }
          ]
        }
      }
    ]
  },

  "main_panel": {
    "type": "input_panel",
    "anchor_from": "top_middle",
    "anchor_to": "top_middle",
    "controls": [
      {
        "offers@common.scrolling_panel": {
          "anchor_from": "top_left",
          "anchor_to": "top_left",
          "size": [ "100% - 2px", "100%" ],
          "$scrolling_pane_size": [ "100%", "100%" ],
          "$scrolling_pane_offset": [ 0, 0 ],
          "$scroll_size": [ 5, "100% - 8px" ],
          "$scrolling_content": "store_layout.scrolling_content_stack",
          "$scroll_bar_left_padding_size": [ 0, 0 ],
          "$show_background": false,
          "$bar_visible": false,
          "bindings": [
            {
              "binding_name": "(not #page_loading_visible)",
              "binding_name_override": "#visible",
              "binding_condition": "always"
            }
          ]
        }
      },
      {
        "progress_loading@common_store.progress_loading": {
          "layer": 100, // Make this on top
          "bindings": [
            {
              "binding_name": "#page_loading_visible",
              "binding_name_override": "#visible",
              "binding_condition": "always"
            }
          ]
        }
      }
    ]
  },

  "nav_button_content": {
    "type": "stack_panel",
    "orientation": "horizontal",
    "size": [ "100%", "100%" ],

    "$nav_button_binding_type|default": "global",
    "$nav_button_collection_name|default": "",

    "controls": [
      {
        "button_image_panel": {
          "type": "panel",
          "size": [ "100%c", "100%" ],
          "controls": [
            {
              "button_image": {
                "type": "image",
                "size": [ 24, 24 ],
                "texture": "#nav_button_texture",
                "allow_debug_missing_texture": false,
                "layer": 1,
                "bindings": [
                  {
                    "binding_type": "$store_factory_collection_details",
                    "binding_collection_name": "$store_factory_collection_name",
                    "binding_collection_prefix": "$store_factory_collection_prefix"
                  },
                  {
                    "binding_type": "$nav_button_binding_type",
                    "binding_collection_name": "$nav_button_collection_name",
                    "binding_name": "#nav_button_texture",
                    "binding_name_override": "#texture"
                  },
                  {
                    "binding_type": "$nav_button_binding_type",
                    "binding_collection_name": "$nav_button_collection_name",
                    "binding_name": "(not (#nav_button_texture = ''))",
                    "binding_name_override": "#visible"
                  }
                ]
              }
            }
          ]
        }
      },
      {
        "padding": {
          "type": "panel",
          "size": [ 4, "100%" ]
        }
      },
      {
        "label_panel": {
          "type": "panel",
          "size": [ "fill", "100%" ],
          "controls": [
            {
              "button_text_label@common_buttons.new_ui_binding_button_label": {
                "layer": 5,
                "$button_text": "#nav_button_label",
                "$button_text_size": [ "100%", "default" ],
                "$button_text_max_size": [ "100%", 20 ],
                "$text_alignment": "left",
                "bindings": [
                  {
                    "binding_type": "$store_factory_collection_details",
                    "binding_collection_name": "$store_factory_collection_name",
                    "binding_collection_prefix": "$store_factory_collection_prefix"
                  },
                  {
                    "binding_type": "$nav_button_binding_type",
                    "binding_collection_name": "$nav_button_collection_name",
                    "binding_name": "$button_text"
                  }
                ]
              }
            }
          ]
        }
      }
    ]
  },

  "nav_button_fill@store_layout.nav_button_standard": {
    "size": [ "fill", "100%" ]
  },

  "nav_button_standard": {
    "type": "panel",
    "size": [ "25%", "100%" ],
    "controls": [
      {
        "nav_button@common_buttons.light_content_button": {
          "size": [ "100% - 2px", "100%" ],
          "$pressed_button_name": "button.nav_button",
          "$button_content": "store_layout.nav_button_content",
          "$button_bindings": [
            {
              "binding_type": "$store_factory_collection_details",
              "binding_collection_name": "$store_factory_collection_name",
              "binding_collection_prefix": "$store_factory_collection_prefix"
            },
            {
              "binding_type": "collection_details",
              "binding_collection_name": "$nav_button_collection_name",
              "binding_collection_prefix": "nav"
            }
          ]
        }
      }
    ]
  },

  "nav_button_grid_panel": {
    "type": "panel",
    "size": [ "100%", "100%c + 4px" ],
    "controls": [
      {
        "nav_button_grid": {
          "type": "stack_panel",
          "orientation": "horizontal",
          "size": [ "100% - 6px", 30 ],

          "clip_state_change_event": "$store_factory_clipping_event",

          "$nav_button_binding_type": "collection",
          "$nav_button_collection_name": "nav_button_collection",
          "collection_name": "$nav_button_collection_name",

          "factory": {
            "name": "nav_button_factory",
            "control_ids": {
              "nav_button_standard": "@store_layout.nav_button_standard",
              "nav_button_fill": "@store_layout.nav_button_fill"
            },
            "factory_variables": [
              "$nav_button_collection_name",
              "$nav_button_binding_type",
              "$store_factory_collection_details",
              "$store_factory_collection_prefix",
              "$store_factory_collection_name"
            ]
          },
          "bindings": [
            {
              "binding_type": "$store_factory_collection_details",
              "binding_collection_name": "$store_factory_collection_name",
              "binding_collection_prefix": "$store_factory_collection_prefix"
            },
            {
              "binding_name": "#nav_section_content",
              "binding_name_override": "#collection_length"              
            }
          ]
        }
      }
    ]
  },

  "store_layout_ribbon_search_button@common_buttons.light_content_button": {
    "size": [ 30, "100%" ],

    // focus vars
    "$focus_id": "skin_pack_category_button",
    "$focus_override_up": "feature_key_art_id",
    "$focus_override_right": "FOCUS_OVERRIDE_STOP",

    // button
    "$button_content": "store_layout.store_layout_ribbon_search_button_content",
    "$image_texture_path": "textures/ui/spyglass_flat",
    "$is_search_screen|default": false,
    "variables": [
      {
        "requires": "($is_search_screen or $is_on_3p_server)",
        "$pressed_button_name": ""
      },
      {
        "requires": "(not $is_search_screen and not $is_on_3p_server)",
        "$pressed_button_name": "button.search"
      },
      {
        "requires": "($is_search_screen and not $is_on_3p_server)",
        "$pressed_button_name": "button.close_result_panel"
      }
    ]
  },

  "store_layout_ribbon_search_button_content": {
    "type": "panel",
    "size": [ "100%c", "100%" ],
    "controls": [
      {
        "button_image": {
          "type": "image",
          "size": [ 9, 9 ],
          "texture": "$image_texture_path",
          "layer": 1,
          "color": "$glyph_color"
        }
      }
    ]
  },


  //--------------------------------------------------------------------------------
  // Screen
  //--------------------------------------------------------------------------------

  "store_data_driven_screen@common_store.store_base_screen": {
    "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"
      }
    ],
    "$default_text_color": [ 0.3, 0.3, 0.3 ],
    "$screen_content": "store_layout.store_screen_content",
    "$header_safezone_control": "common_store.store_top_bar_filler",
    "$header_bar_control": "common_store.store_top_bar",
    "$screen_background_control": "common_store.store_background",
    "$is_full_screen_layout": true,
    "$fill_alpha": 0.75
  },

  "store_screen_content": {
    "type": "panel",
    "alpha": "@common_store.screen_fade_in_alpha_anim",
    "propagate_alpha": true,
    "disable_anim_fast_forward": true,
    "controls": [
      {
        "main_panel@common_store.store_header_with_coins": {
          "$child_control": "store_layout.main_panel",
          "$button_text": "store.title"
        }
      },
      {
        "popup_dialog_factory": {
          "type": "factory",
          "control_ids": {
            "no_store_connection": "@common_store.popup_dialog__no_store_connection",
            "restore_popup": "@common_store.popup_dialog__restore_popup",
            "restore_failed": "@common_store.popup_dialog__restore_failed"
          }
        }
      }
    ]
  }
}