{
  "namespace": "coin_purchase",

  "black_image": {
    "type": "image",
    "texture": "textures/ui/Black"
  },

  "banner_fill": {
    "type": "image",
    "texture": "textures/ui/Banners"
  },

  "coins_stack_panel": {
    "type": "stack_panel",
    "layer": 1,
    "orientation": "horizontal",
    "anchor_from": "bottom_middle",
    "anchor_to": "bottom_middle",
    "size": [ "default", 13 ],
    "controls": [
      {
        "coin@common_store.coin_icon": {}
      },
      {
        "coin_padding": {
          "type": "panel",
          "size": [1, "100%"]
        }
      },
      {
        "text_padding": {
          "type": "panel",
          "size": [ "100%c", "100%c" ],
          "controls": [
            {
              "coins_without_bonus": {
                "type": "label",
                "layer": 3,
                "offset": [ 0, 1 ],
                "text": "$coin_text_binding",
                "color": "$store_white_text_color",
                "tts_override_control_value": "$accesibility_binding",
                "bindings": [
                  {
                    "binding_type": "$store_factory_collection_details",
                    "binding_collection_name": "$store_factory_collection_name",
                    "binding_collection_prefix": "$store_factory_collection_prefix"
                  },
                  {
                    "binding_type": "$offer_binding_type",
                    "binding_collection_name": "$offer_collection_name",
                    "binding_name": "$coin_text_binding"
                  },
                  {
                    "binding_type": "$offer_binding_type",
                    "binding_collection_name": "$offer_collection_name",
                    "binding_name": "$accesibility_binding"
                  }
                ]
              }
            }
          ]
        }
      }
    ]
  },

  "call_out_coins_stack_panel": {
    "type": "stack_panel",
    "layer": 1,
    "orientation": "horizontal",
    "anchor_from": "bottom_middle",
    "anchor_to": "bottom_middle",
    "size": [ "default", 13 ],
    "controls": [
      {
        "coin@common_store.coin_icon": {}
      },
      {
        "coin_padding": {
          "type": "panel",
          "size": [ 1, "100%" ]
        }
      },
      {
        "text_padding": {
          "type": "panel",
          "size": [ "100%c", "100%c" ],
          "controls": [
            {
              "coins_without_bonus": {
                "type": "label",
                "layer": 3,
                "offset": [ 0, 1 ],
                "text": "#coins_without_bonus",
                "color": "$store_white_text_color", // Sadly the unit test doesn't detect bindings so we have to put this here even through we will overwrite it or we won't pass the builds :'(
                "tts_override_control_value": "#accessibility_coins_without_bonus",
                "bindings": [
                  {
                    "binding_type": "$store_factory_collection_details",
                    "binding_collection_name": "$store_factory_collection_name",
                    "binding_collection_prefix": "$store_factory_collection_prefix"
                  },
                  {
                    "binding_name": "#coins_without_bonus",
                    "binding_type": "collection",
                    "binding_collection_name": "coin_purchase_grid"
                  },
                  {
                    "binding_name": "#accessibility_coins_without_bonus",
                    "binding_type": "collection",
                    "binding_collection_name": "coin_purchase_grid"
                  },
                  {
                    "binding_type": "collection",
                    "binding_collection_name": "coin_purchase_grid",
                    "binding_name": "#call_out_color",
                    "binding_name_override": "#color"
                  }
                ]
              }
            }
          ]
        }
      }
    ]
  },

  "button_content": {
    "type": "panel",
    "offset": [ 0, -3 ],
    "anchor_from": "top_middle",
    "anchor_to": "top_middle",
    "size": [ "100% + 2px", "100%" ],
    "controls": [
      {
        "bonus_coins_stack@coin_purchase.bonus_coins_stack": {}
      },
      {
        "call_out_background": {
          "type": "image",
          "size": [ "100% + 2px", "100%" ],
          "layer": -8,
          "anchor_from": "top_middle",
          "anchor_to": "top_middle",
          "texture": "textures/ui/cointier_backdrop",
          "controls": [
            {
              "bevel": {
                "type": "image",
                "size": [ "100% + 2px", "100% + 6px" ],
                "color": "$coin_screen_callout_bevel_color",
                "layer": 9,
                "anchor_from": "top_middle",
                "anchor_to": "top_middle",
                "texture": "textures/ui/coin_bevel"
              }
            }
          ]
        }
      }
    ]
  },

  "call_out_button_content": {
    "type": "panel",
    "anchor_from": "top_middle",
    "anchor_to": "top_middle",
    "size": [ "100%", "100%" ],
    "controls": [
      {
        "call_out_header@coin_purchase.call_out_header": {}
      },
      {
        "call_out_bonus_coins_stack@coin_purchase.call_out_bonus_coins_stack": {}
      },
      {
        "call_out_background": {
          "type": "image",
          "size": [ "100% + 4px", "100%" ],
          "layer": -8,
          "anchor_from": "top_middle",
          "anchor_to": "top_middle",
          "texture": "textures/ui/cointier_backdrop",
          "controls": [
            {
              "call_out_border": {
                "type": "image",
                "size": [ "100% + 2px", "100% + 6px" ],
                "offset": [ 0, -3 ],
                "layer": 10,
                "anchor_from": "top_middle",
                "anchor_to": "top_middle",
                "texture": "textures/ui/focus_border_white",
                "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": "coin_purchase_grid",
                    "binding_name": "#call_out_color",
                    "binding_name_override": "#color"
                  }
                ]
              }
            }
          ]
        }
      }
    ]
  },

  "call_out_header": {
    "type": "panel",
    "anchor_from": "top_middle",
    "anchor_to": "top_middle",
    "size": [ "100%", 18 ],
    "offset": [ 0, -3 ],
    "layer": 8,
    "controls": [
      {
        "call_out_banner": {
          "type": "image",
          "size": [ "100% + 6px", "100% + 2px" ],
          "layer": 1,
          "anchor_from": "top_middle",
          "anchor_to": "top_middle",
          "texture": "textures/ui/call_out_header",
          "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": "coin_purchase_grid",
              "binding_name": "#call_out_banner_color",
              "binding_name_override": "#color"
            }
          ]
        }
      },
      {
        "call_out_label": {
          "type": "label",
          "size": [ "default", 10 ],
          "layer": 2,
          "color": "$coin_header_text_color",
          "text_alignment": "center",
          "font_type": "smooth",
          "text": "#call_out_text",
          "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": "coin_purchase_grid",
              "binding_name": "#call_out_text"
            }
          ]
        }
      }
    ]
  },

  "bonus_coins_stack": {
    "type": "stack_panel",
    "orientation": "vertical",
    "size": [ "100% - 6px", "100%" ],
    "offset": [ 0, 2 ],
    "anchor_from": "bottom_middle",
    "anchor_to": "bottom_middle",
    "layer": 2,
    "controls": [
      {
        "image_padding": {
          "type": "panel",
          "size": [ "100%", 12 ]
        }
      },
      {
        "image_panel": {
          "type": "panel",
          "size": [ "100%", "fill" ],
          "controls": [
            {
              "image": {
                "type": "image",
                "size": [ "85.711%y", "100% + 7px" ],
                "max_size": [ "100%", "100% + 7px" ],
                "layer": 2,
                "bilinear": true,
                "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": "coin_purchase_grid",
                    "binding_name": "#coin_offer_texture_name",
                    "binding_name_override": "#texture"
                  },
                  {
                    "binding_type": "collection",
                    "binding_collection_name": "coin_purchase_grid",
                    "binding_name": "#coin_offer_texture_file_system",
                    "binding_name_override": "#texture_file_system"
                  }
                ]
              }
            }
          ]
        }
      },
      {
        "non_bonus_padding_0": {
          "type": "panel",
          "size": [ "100%", 10 ],
          "bindings": [
            {
              "binding_type": "$store_factory_collection_details",
              "binding_collection_name": "$store_factory_collection_name",
              "binding_collection_prefix": "$store_factory_collection_prefix"
            },
            {
              "binding_name": "(not #bonus_coins_visible)",
              "binding_name_override": "#visible",
              "binding_type": "collection",
              "binding_collection_name": "coin_purchase_grid"
            }
          ]
        }
      },
      {
        "price_panel": {
          "type": "panel",
          "layer": 1,
          "size": [ "100%", "100%c" ],
          "controls": [
            {
              "coins_stack_panel@coin_purchase.coins_stack_panel": {
                "$coin_text_binding": "#coins_without_bonus",
                "$accesibility_binding": "#accessibility_coins_without_bonus",

                "layer": 3
              }
            }
          ]
        }
      },
      {
        "plus_label": {
          "type": "panel",
          "size": [ "100%", 10 ],
          "controls": [
            {
              "plus_label": {
                "type": "label",
                "size": [ "default", 10 ],
                "layer": 1,
                "text": "+",
                "color": "$store_white_text_color"
              }
            }
          ],
          "bindings": [
            {
              "binding_type": "$store_factory_collection_details",
              "binding_collection_name": "$store_factory_collection_name",
              "binding_collection_prefix": "$store_factory_collection_prefix"
            },
            {
              "binding_name": "#bonus_coins_visible",
              "binding_name_override": "#visible",
              "binding_type": "collection",
              "binding_collection_name": "coin_purchase_grid"
            }
          ]
        }
      },
      {
        "non_bonus_padding_1": {
          "type": "panel",
          "size": [ "100%", 21 ],
          "bindings": [
            {
              "binding_type": "$store_factory_collection_details",
              "binding_collection_name": "$store_factory_collection_name",
              "binding_collection_prefix": "$store_factory_collection_prefix"
            },
            {
              "binding_name": "(not #bonus_coins_visible)",
              "binding_name_override": "#visible",
              "binding_type": "collection",
              "binding_collection_name": "coin_purchase_grid"
            }
          ]
        }
      },
      {
        "bonus_label_panel": {
          "type": "panel",
          "size": [ "100%", 10 ],
          "bindings": [
            {
              "binding_type": "$store_factory_collection_details",
              "binding_collection_name": "$store_factory_collection_name",
              "binding_collection_prefix": "$store_factory_collection_prefix"
            },
            {
              "binding_name": "#bonus_coins_visible",
              "binding_name_override": "#visible",
              "binding_type": "collection",
              "binding_collection_name": "coin_purchase_grid"
            }
          ],
          "controls": [
            {
              "bonus_label": {
                "type": "label",
                "size": [ "default", "100%" ],
                "text": "store.coin.bonus",
                "color": "$store_white_text_color",
                "layer": 6
              }
            }
          ]
        }
      },
      {
        "padding_0": {
          "type": "panel",
          "size": [ "100%", 1 ]
        }
      },
      {
        "bonus_price_panel": {
          "type": "panel",
          "layer": 1,
          "size": [ "100%", "100%c" ],
          "bindings": [
            {
              "binding_type": "$store_factory_collection_details",
              "binding_collection_name": "$store_factory_collection_name",
              "binding_collection_prefix": "$store_factory_collection_prefix"
            },
            {
              "binding_name": "#bonus_coins_visible",
              "binding_name_override": "#visible",
              "binding_type": "collection",
              "binding_collection_name": "coin_purchase_grid"
            }
          ],
          "controls": [
            {
              "coins_stack_panel@coin_purchase.coins_stack_panel": {
                "$coin_text_binding": "#bonus_coins",
                "$accesibility_binding": "#accessibility_bonus_coins",
                "layer": 3
              }
            }
          ]
        }
      },
      {
        "padding_1": {
          "type": "panel",
          "size": [ "100%", 2 ]
        }
      },
      {
        "currency_panel": {
          "type": "panel",
          "size": [ "100%", 14 ],
          "controls": [
            {
              "currency_price_panel": {
                "type": "image",
                "offset": [ 0, 4.5 ],
                "size": [ "100% + 8px", 15 ],
                "layer": -4,
                "texture": "textures/ui/bonus_banner",
                "color": "$coin_color",
                "controls": [
                  {
                    "price@coin_purchase.price": {
                      "$price_color": "$coin_offer_text_color",
                      "$price_visible": "(not #debug_price_visible)"
                    }
                  },
                  {
                    "debug_price@coin_purchase.price": {
                      "$price_color": "$c_color_format", // Red
                      "$price_visible": "#debug_price_visible"

                    }
                  }
                ]
              }
            }
          ]
        }
      },
      {
        "padding_2": {
          "type": "panel",
          "size": [ "100%", 1 ]
        }
      }
    ]
  },

  "call_out_bonus_coins_stack": {
    "type": "stack_panel",
    "orientation": "vertical",
    "size": [ "100% - 4px", "100%" ],
    "anchor_from": "bottom_middle",
    "anchor_to": "bottom_middle",
    "layer": 4,
    "controls": [
      {
        "image_padding": {
          "type": "panel",
          "size": [ "100%", 16 ]
        }
      },
      {
        "image_panel": {
          "type": "panel",
          "size": [ "100%", "fill" ],
          "controls": [
            {
              "image": {
                "type": "image",
                "size": [ "85.711%y", "100% + 7px" ],
                "max_size": [ "100%", "100% + 7px" ],
                "layer": 1, //-2,
                "bilinear": true,
                "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": "coin_purchase_grid",
                    "binding_name": "#coin_offer_texture_name",
                    "binding_name_override": "#texture"
                  },
                  {
                    "binding_type": "collection",
                    "binding_collection_name": "coin_purchase_grid",
                    "binding_name": "#coin_offer_texture_file_system",
                    "binding_name_override": "#texture_file_system"
                  }
                ]
              }
            }
          ]
        }
      },
      {
        "non_bonus_padding_0": {
          "type": "panel",
          "size": [ "100%", 10 ],
          "bindings": [
            {
              "binding_type": "$store_factory_collection_details",
              "binding_collection_name": "$store_factory_collection_name",
              "binding_collection_prefix": "$store_factory_collection_prefix"
            },
            {
              "binding_name": "(not #bonus_coins_visible)",
              "binding_name_override": "#visible",
              "binding_type": "collection",
              "binding_collection_name": "coin_purchase_grid"
            }
          ]
        }
      },
      {
        "price_panel": {
          "type": "panel",
          "layer": 2,
          "size": [ "100%", "100%c" ],
          "controls": [
            {
              "call_out_coins_stack_panel@coin_purchase.call_out_coins_stack_panel": {
                "layer": 1
              }
            }
          ]
        }
      },
      {
        "plus_label": {
          "type": "panel",
          "size": [ "100%", 10 ],
          "controls": [
            {
              "plus_label": {
                "type": "label",
                "size": [ "default", 10 ],
                "layer": 2,
                "text": "+",
                "color": "$store_white_text_color"
              }
            }
          ],
          "bindings": [
            {
              "binding_type": "$store_factory_collection_details",
              "binding_collection_name": "$store_factory_collection_name",
              "binding_collection_prefix": "$store_factory_collection_prefix"
            },
            {
              "binding_name": "#bonus_coins_visible",
              "binding_name_override": "#visible",
              "binding_type": "collection",
              "binding_collection_name": "coin_purchase_grid"
            }
          ]
        }
      },
      {
        "non_bonus_padding": {
          "type": "panel",
          "size": [ "100%", 21 ],
          "bindings": [
            {
              "binding_type": "$store_factory_collection_details",
              "binding_collection_name": "$store_factory_collection_name",
              "binding_collection_prefix": "$store_factory_collection_prefix"
            },
            {
              "binding_name": "(not #bonus_coins_visible)",
              "binding_name_override": "#visible",
              "binding_type": "collection",
              "binding_collection_name": "coin_purchase_grid"
            }
          ]
        }
      },
      {
        "bonus_label_panel": {
          "type": "panel",
          "size": [ "100%", 10 ],
          "bindings": [
            {
              "binding_type": "$store_factory_collection_details",
              "binding_collection_name": "$store_factory_collection_name",
              "binding_collection_prefix": "$store_factory_collection_prefix"
            },
            {
              "binding_name": "#bonus_coins_visible",
              "binding_name_override": "#visible",
              "binding_type": "collection",
              "binding_collection_name": "coin_purchase_grid"
            }
          ],
          "controls": [
            {
              "bonus_label": {
                "type": "label",
                "size": [ "default", "100%" ],
                "text": "store.coin.bonus",
                "layer": 2,
                "color": "$store_white_text_color", // Sadly the unit test doesn't detect bindings so we have to put this here even through we will overwrite it or we won't pass the builds :'(
                "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": "coin_purchase_grid",
                    "binding_name": "#call_out_color",
                    "binding_name_override": "#color"
                  }
                ]
              }
            }
          ]
        }
      },
      {
        "padding_0": {
          "type": "panel",
          "size": [ "100%", 1 ]
        }
      },
      {
        "bonus_coin_panel": {
          "type": "stack_panel",
          "orientation": "horizontal",
          "size": [ "100%", 11 ],
          "layer": 2,
          "bindings": [
            {
              "binding_type": "$store_factory_collection_details",
              "binding_collection_name": "$store_factory_collection_name",
              "binding_collection_prefix": "$store_factory_collection_prefix"
            },
            {
              "binding_name": "#bonus_coins_visible",
              "binding_name_override": "#visible",
              "binding_type": "collection",
              "binding_collection_name": "coin_purchase_grid"
            }
          ],
          "controls": [
            {
              "fill_panel_0": {
                "type": "panel",
                "size": [ "fill", "100%" ]
              }
            },
            {
              "coin_panel": {
                "type": "panel",
                "size": [ "100%c", "100%" ],
                "controls": [
                  {
                    "coin@common_store.coin_icon": {
                    }
                  }
                ]
              }
            },
            {
              "coin_padding": {
                "type": "panel",
                "size": [ 1, "100%" ]
              }
            },
            {
              "bonus_coin_label_panel": {
                "type": "panel",
                "size": [ "100%c", "100%" ],
                "controls": [
                  {
                    "bonus_coins": {
                      "type": "label",
                      "layer": 1,
                      "text": "#bonus_coins",
                      "size": [ "default", 10 ],
                      "color": "$store_white_text_color", // Sadly the unit test doesn't detect bindings so we have to put this here even through we will overwrite it or we won't pass the builds :'(
                      "tts_override_control_value": "#accessibility_bonus_coins",
                      "bindings": [
                        {
                          "binding_type": "$store_factory_collection_details",
                          "binding_collection_name": "$store_factory_collection_name",
                          "binding_collection_prefix": "$store_factory_collection_prefix"
                        },
                        {
                          "binding_name": "#bonus_coins",
                          "binding_type": "collection",
                          "binding_collection_name": "coin_purchase_grid"
                        },
                        {
                          "binding_name": "#accessibility_bonus_coins",
                          "binding_type": "collection",
                          "binding_collection_name": "coin_purchase_grid"
                        },
                        {
                          "binding_type": "collection",
                          "binding_collection_name": "coin_purchase_grid",
                          "binding_name": "#call_out_color",
                          "binding_name_override": "#color"
                        }
                      ]
                    }
                  }
                ]
              }
            },
            {
              "fill_panel_1": {
                "type": "panel",
                "size": [ "fill", "100%" ]
              }
            }
          ]
        }
      },
      {
        "padding_1": {
          "type": "panel",
          "size": [ "100%", 2 ]
        }
      },
      {
        "currency_panel": {
          "type": "panel",
          "size": [ "100%", 14 ],
          "controls": [
            {
              "currency_price_panel": {
                "type": "image",
                "offset": [ 0, 3.5 ],
                "layer": -4,
                "size": [ "100% + 9px", 15 ],
                "texture": "textures/ui/bonus_banner",
                "color": "$coin_color",
                "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": "coin_purchase_grid",
                    "binding_name": "#call_out_color",
                    "binding_name_override": "#color"
                  }
                ],
                "controls": [
                  {
                    "price@coin_purchase.price": {
                      "$price_color": "$coin_offer_text_color",
                      "$price_visible": "(not #debug_price_visible)"
                    }
                  },
                  {
                    "debug_price@coin_purchase.price": {
                      "$price_color": "$c_color_format", // Red
                      "$price_visible": "#debug_price_visible"

                    }
                  }
                ]
              }
            }
          ]
        }
      },
      {
        "padding_2": {
          "type": "panel",
          "size": [ "100%", 1 ]
        }
      }
    ]
  },

  "price": {
    "type": "label",
    "size": [ "default", 10 ],
    "color": "$price_color",
    "text": "#price_text",
    "layer": 5,
    "text_alignment": "center",
    "font_type": "smooth",
    "bindings": [
      {
        "binding_type": "$store_factory_collection_details",
        "binding_collection_name": "$store_factory_collection_name",
        "binding_collection_prefix": "$store_factory_collection_prefix"
      },
      {
        "binding_type": "$offer_binding_type",
        "binding_collection_name": "$offer_collection_name",
        "binding_name": "$price_visible",
        "binding_name_override": "#visible"
      },
      {
        "binding_type": "$offer_binding_type",
        "binding_collection_name": "$offer_collection_name",
        "binding_name": "#price_text"
      }
    ]
  },

  "offer_panel@common_buttons.light_content_button": {
    "offset": [ 0, 8 ],
    "$button_size_override": [ "100%", "100%" ],
    "$button_content": "coin_purchase.button_content",
    "$pressed_button_name": "button.purchase_coins",
    "$anchor": "top_left",
    "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": "coin_purchase_grid"
      },
      {
        "binding_name": "(not #is_call_out)",
        "binding_type": "collection",
        "binding_collection_name": "coin_purchase_grid",
        "binding_name_override": "#visible"
      }
    ]
  },

  "call_out_offer_panel@common_buttons.light_content_button": {
    "offset": [ 0, 4 ],
    "$button_size_override": [ "100%", "100% + 8px" ],
    "$button_content": "coin_purchase.call_out_button_content",
    "$pressed_button_name": "button.purchase_coins",
    "$anchor": "top_left",
    "$border_hover_layer": 15,
    "$border_pressed_layer": 15,
    "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": "coin_purchase_grid"
      },
      {
        "binding_name": "#is_call_out",
        "binding_type": "collection",
        "binding_collection_name": "coin_purchase_grid",
        "binding_name_override": "#visible"
      }
    ]
  },

  "offer_item": {
    "type": "panel",
    "anchor_from": "center",
    "anchor_to": "center",
    "size": [ "100% - 4px", "100% - 6px" ],
    "controls": [
      {
        "offer_panel@coin_purchase.offer_panel": {
          "layer": 3
        }
      },
      {
        "call_out_offer_panel@coin_purchase.call_out_offer_panel": {
          "layer": 3
        }
      }
    ]
  },

  "offer_grid_item": {
    "type": "panel",
    "size": "$grid_item_size",
    "$button_image_size": [ "100%", "100%" ],
    "$default_button_texture": "textures/ui/focus_border_white",
    "$hover_button_texture": "textures/ui/focus_border_white",
    "$pressed_button_texture": "textures/ui/focus_border_white",
    "$border_hover_layer": 9,
    "$border_pressed_layer": 9,
    "$grid_item_size": [ "fill", "100% - 8px" ],
    "controls": [
      {
        "offer_item@coin_purchase.offer_item": {
          "$offer_binding_type": "collection",
          "$offer_collection_name": "coin_purchase_grid"
        }
      }
    ]
  },

  "not_enough_coins": {
    "type": "label",
    "size": [ "100%", "default" ],
    "color": "$store_white_text_color",
    "anchor_from": "top_middle",
    "anchor_to": "top_middle",
    "text_alignment": "center",
    "layer": 3,
    "text": "#coins_text",
    "bindings": [
      {
        "binding_name": "#coins_required_for_purchase",
        "binding_name_override": "#coins_text"
      },
      {
        "binding_name": "#show_missing_coins",
        "binding_name_override": "#visible"
      }
    ]
  },

  "faq_button@common_buttons.light_text_button": {
    "type": "button",
    "size": [ "100%", "25px" ],
    "$button_focus_precedence": 10,
    "ignored": "(not $show_tokens_faq_button)",
    "$pressed_button_name": "$button_action",
    "$button_action": "button.faq_screen",
    "$focus_id": "faq_button",
    "$button_text": "store.tokens.faq"
  },

  "divider_panel": {
    "type": "panel",
    "size": [ "100%", "100%c" ],
    "ignored": "(not $show_tokens_faq_button)",
    "controls": [
      {
        "divider": {
          "type": "image",
          "size": [ "100% - 6px", 1 ],
          "texture": "textures/ui/divider2",
          "tiled": "x",
          "alpha": 0.6
        }
      }
    ]
  },

  "coin_purchase_panel": {
    "type": "stack_panel",
    "layer": 1,
    "size": [ "100% - 4px", "100%" ],
    "offset": [ 2, 0 ],
    "orientation": "vertical",
    "anchor_from": "top_left",
    "anchor_to": "top_left",
    "controls": [
      {
        "padding_0": {
          "type": "panel",
          "size": [ "100%", 5 ],
          "bindings": [
            {
              "binding_name": "#needs_more_coins",
              "binding_name_override": "#visible"
            }
          ]
        }
      },
      {
        "not_enough_coins_panel": {
          "type": "panel",
          "anchor_from": "top_middle",
          "anchor_to": "top_middle",
          "size": [ "100%", "100%c" ],
          "bindings": [
            {
              "binding_name": "#needs_more_coins",
              "binding_name_override": "#visible"
            }
          ],
          "controls": [
            { "not_enough_coins@coin_purchase.not_enough_coins": {} }
          ]
        }
      },
      {
        "padding_1": {
          "type": "panel",
          "size": [ "100%", 2 ],
          "bindings": [
            {
              "binding_name": "#needs_more_coins",
              "binding_name_override": "#visible"
            }
          ]
        }
      },
      {
        "coin_purchase_grid": {
          "type": "grid",
          "grid_item_template": "coin_purchase.offer_grid_item",
          "grid_dimension_binding": "#coin_offer_size",
          "collection_name": "coin_purchase_grid",
          "$offer_collection_details": "collection_details",
          "$offer_binding_type": "collection",
          "$offer_collection_prefix": "offer",
          "$offer_collection_name": "offer_collection",
          "size": [ "100%", "fill" ],
          "bindings": [
            {
              "binding_name": "#coin_offer_size"
            },
            {
              "binding_name": "#has_coin_offers",
              "binding_name_override": "#visible",
              "binding_type": "global"
            },
            {
              "binding_type": "$store_factory_collection_details",
              "binding_collection_name": "$store_factory_collection_name",
              "binding_collection_prefix": "$store_factory_collection_prefix"
            }
          ]
        }
      },
      {
        "divider_panel@coin_purchase.divider_panel": {}
      },
      {
        "faq_button@coin_purchase.faq_button": {}
      }
    ]
  },

  "main_panel": {
    "type": "panel",
    "layer": 1,
    "size": [ "100%", "17%x + 82px" ],
    "anchor_from": "top_left",
    "anchor_to": "top_left",
    "clip_state_change_event": "$store_factory_clipping_event",
    "bindings": [
      {
        "binding_type": "$store_factory_collection_details",
        "binding_collection_name": "$store_factory_collection_name",
        "binding_collection_prefix": "$store_factory_collection_prefix"
      }
    ],
    "controls": [
      {
        "coin_purchase_panel@coin_purchase.coin_purchase_panel": {
          "layer": 2,
          "bindings": [
            {
              "binding_name": "(not #coin_loading_visible)",
              "binding_name_override": "#visible",
              "binding_type": "global"
            },
            {
              "binding_type": "$store_factory_collection_details",
              "binding_collection_name": "$store_factory_collection_name",
              "binding_collection_prefix": "$store_factory_collection_prefix"
            }
          ]
        }
      },
      {
        "loading_background": {
          "type": "image",
          "texture": "textures/ui/banners_no_border",
          "size": [ "100% - 4px", "default" ],
          "bindings": [
            {
              "binding_name": "#coin_loading_visible",
              "binding_name_override": "#visible",
              "binding_type": "global"
            },
            {
              "binding_type": "$store_factory_collection_details",
              "binding_collection_name": "$store_factory_collection_name",
              "binding_collection_prefix": "$store_factory_collection_prefix"
            }
          ]
        }
      },
      {
        "progress_loading_spinner@common_store.progress_loading_spinner": {
          "layer": 100, // Make this on top
          "bindings": [
            {
              "binding_name": "#coin_loading_visible",
              "binding_name_override": "#visible",
              "binding_type": "global"
            },
            {
              "binding_type": "$store_factory_collection_details",
              "binding_collection_name": "$store_factory_collection_name",
              "binding_collection_prefix": "$store_factory_collection_prefix"
            }
          ]
        }
      },
      {
        "no_offers_panel": {
          "type": "label",
          "size": [ "100%", "100%" ],
          "text": "store.minecoin.notavailable",
          "color": "$generic_button_text_color",
          "bindings": [
            {
              "binding_name": "(not #has_coin_offers)",
              "binding_name_override": "#visible",
              "binding_type": "global"
            },
            {
              "binding_type": "$store_factory_collection_details",
              "binding_collection_name": "$store_factory_collection_name",
              "binding_collection_prefix": "$store_factory_collection_prefix"
            }
          ]
        }
      }
    ]
  },

  "background@common.screen_background": {
    "alpha": 0.65,
    "layer": 1
  },

  "bundle_description@common_store.text_style_label": {

    "$text_style_label": "#coin_bundle_description_text",
    "$tts_text_override_value": "#coin_bundle_description_text_tts",
    "$text_style_font_type": "#coin_bundle_description_font_type",
    "$text_style_font_size": "#coin_bundle_description_font_size",
    "$text_style_font_color": "#coin_bundle_description_font_color",

    "$text_style_label_bindings": [
      {
        "binding_type": "$store_factory_collection_details",
        "binding_collection_name": "$store_factory_collection_name",
        "binding_collection_prefix": "$store_factory_collection_prefix"
      },
      {
        "binding_type": "$offer_collection_details",
        "binding_collection_name": "$offer_collection_name",
        "binding_collection_prefix": "$offer_collection_prefix"
      },
      {
        "binding_type": "collection_details",
        "binding_collection_name": "bundle_description",
        "binding_collection_prefix": "bundle_description"
      },
      {
        "binding_type": "collection",
        "binding_collection_name": "bundle_description",
        "binding_name": "$text_style_label"
      },
      {
        "binding_type": "collection",
        "binding_collection_name": "bundle_description",
        "binding_name": "$tts_text_override_value",
        "binding_condition": "once"
      },
      {
        "binding_type": "collection",
        "binding_collection_name": "bundle_description",
        "binding_name": "$text_style_font_type",
        "binding_name_override": "#font_type"
      },
      {
        "binding_type": "collection",
        "binding_collection_name": "bundle_description",
        "binding_name": "$text_style_font_size",
        "binding_name_override": "#font_scale_factor"
      },
      {
        "binding_type": "collection",
        "binding_collection_name": "bundle_description",
        "binding_name": "$text_style_font_color",
        "binding_name_override": "#color"
      }
    ]
  },

  // Maybe bind this instead?
  "bundle_description_left@coin_purchase.bundle_description": {
    "$text_style_alignment": "left"
  },

  "bundle_description_center@coin_purchase.bundle_description": {
    "$text_style_alignment": "center"
  },

  "bundle_description_right@coin_purchase.bundle_description": {
    "$text_style_alignment": "right"
  },

  "bundle_coins_stack": {
    "type": "stack_panel",
    "orientation": "vertical",
    "size": [ "100% - 6px", "100%" ],
    "offset": [ 0, 2 ],
    "anchor_from": "bottom_middle",
    "anchor_to": "bottom_middle",
    "layer": 2,
    "controls": [
      {
        "content_panel": {
          "type": "stack_panel",
          "orientation": "horizontal",
          "size": [ "100%", "fill" ],
          "controls": [
            {
              "text_stack": {
                "type": "stack_panel",
                "size": [ "fill", "100%" ],
                "anchor_from": "top_left",
                "anchor_to": "top_left",
                "orientation": "vertical",
                "controls": [
                  {
                    "title_label": {
                      "type": "label",
                      "size": [ "100%", 10 ],
                      "font_type": "smooth",
                      "layer": 1,
                      "text": "#coin_bundle_title",
                      "color": "$store_white_text_color",
                      "bindings": [
                        {
                          "binding_type": "$store_factory_collection_details",
                          "binding_collection_name": "$store_factory_collection_name",
                          "binding_collection_prefix": "$store_factory_collection_prefix"
                        },
                        {
                          "binding_type": "$offer_binding_type",
                          "binding_name": "#coin_bundle_title",
                          "binding_collection_name": "$offer_collection_name"
                        }
                      ]
                    }
                  },
                  {
                    "padding_1": {
                      "type": "panel",
                      "size": [ "100%", 2 ]
                    }
                  },
                  {
                    "description_section_factory": {
                      "type": "stack_panel",
                      "orientation": "vertical",
                      "size": [ "100%", "fill" ],
                      "collection_name": "bundle_description",
                      "clips_children": true,
                      "factory": {
                        "name": "bundle_description_factory",
                        "control_ids": {
                          "bundle_description_left": "@coin_purchase.bundle_description_left",
                          "bundle_description_center": "@coin_purchase.bundle_description_center",
                          "bundle_description_right": "@coin_purchase.bundle_description_right"
                        },
                        "factory_variables": [
                          "$offer_collection_details",
                          "$offer_binding_type",
                          "$offer_collection_name",
                          "$offer_collection_prefix",
                          "$store_factory_collection_details",
                          "$store_factory_collection_prefix",
                          "$store_factory_collection_name",
                          "$section_name"
                        ]
                      },
                      "bindings": [
                        {
                          "binding_type": "$store_factory_collection_details",
                          "binding_collection_name": "$store_factory_collection_name",
                          "binding_collection_prefix": "$store_factory_collection_prefix"
                        },
                        {
                          "binding_type": "$offer_collection_details",
                          "binding_collection_name": "$offer_collection_name",
                          "binding_collection_prefix": "$offer_collection_prefix"
                        },
                        {
                          "binding_name": "#coin_bundle_description_section",
                          "binding_name_override": "#collection_length",
                          "binding_type": "$store_factory_binding_type",
                          "binding_collection_name": "$store_factory_collection_name"
                        }
                      ]
                    }
                  }
                ]
              }
            },
            {
              "thumbnail_panel": {
                "type": "panel",
                "size": [ "100%c", "100%" ],
                "controls": [
                  {
                    "thumbnail": { //just one thumbnail for now
                      "type": "image",
                      "size": [ "177.78%y", "100% - 6px" ],
                      "layer": 2,
                      "bilinear": true,
                      "bindings": [
                        {
                          "binding_type": "$store_factory_collection_details",
                          "binding_collection_name": "$store_factory_collection_name",
                          "binding_collection_prefix": "$store_factory_collection_prefix"
                        },
                        {
                          "binding_type": "$offer_binding_type",
                          "binding_collection_name": "$offer_collection_name",
                          "binding_name": "#bundle_thumbnail_texture_name",
                          "binding_name_override": "#texture"
                        },
                        {
                          "binding_type": "$offer_binding_type",
                          "binding_collection_name": "$offer_collection_name",
                          "binding_name": "#bundle_thumbnail_texture_file_system",
                          "binding_name_override": "#texture_file_system"
                        },
                        {
                          "binding_type": "$offer_binding_type",
                          "binding_collection_name": "$offer_collection_name",
                          "binding_name": "#bundle_is_owned",
                          "binding_name_override": "#grayscale"
                        }
                      ],
                      "controls": [
                        {
                          "coin_image": {
                            "type": "image",
                            "size": [ 36, 36 ],
                            "anchor_from": "right_middle",
                            "anchor_to": "top_middle",
                            "layer": 3,
                            "bilinear": true,
                            "bindings": [
                              {
                                "binding_type": "$store_factory_collection_details",
                                "binding_collection_name": "$store_factory_collection_name",
                                "binding_collection_prefix": "$store_factory_collection_prefix"
                              },
                              {
                                "binding_type": "$offer_binding_type",
                                "binding_collection_name": "$offer_collection_name",
                                "binding_name": "#bundle_coin_texture_name",
                                "binding_name_override": "#texture"
                              },
                              {
                                "binding_type": "$offer_binding_type",
                                "binding_collection_name": "$offer_collection_name",
                                "binding_name": "#bundle_coin_texture_file_system",
                                "binding_name_override": "#texture_file_system"
                              }
                            ]
                          }
                        }
                      ]
                    }
                  }
                ]
              }
            },
            {
              "padding_0": {
                "type": "panel",
                "size": [ 14, "100%" ]
              }
            }
          ]
        }
      },
      {
        "padding_0": {
          "type": "panel",
          "size": [ "100%", 2 ]
        }
      },
      {
        "currency_panel": {
          "type": "panel",
          "size": [ "100%", 14 ],
          "controls": [
            {
              "currency_price_panel": {
                "type": "image",
                "size": [ "100% + 10px", "100%" ],
                "offset": [ 0, 1 ],
                "layer": -4,
                "texture": "textures/ui/bonus_banner",
                "bindings": [
                  {
                    "binding_type": "$store_factory_collection_details",
                    "binding_collection_name": "$store_factory_collection_name",
                    "binding_collection_prefix": "$store_factory_collection_prefix"
                  },
                  {
                    "binding_type": "$offer_binding_type",
                    "binding_collection_name": "$offer_collection_name",
                    "binding_name": "#bundle_banner_color",
                    "binding_name_override": "#color"
                  }
                ],
                "controls": [
                  {
                    "price@coin_purchase.price": {
                      "$price_color": "$coin_offer_text_color",
                      "$price_visible": "(not #debug_price_visible)"
                    }
                  },
                  {
                    "debug_price@coin_purchase.price": {
                      "$price_color": "$c_color_format", // Red
                      "$price_visible": "#debug_price_visible"

                    }
                  }
                ]
              }
            }
          ]
        }
      },
      {
        "padding_2": {
          "type": "panel",
          "size": [ "100%", 1 ]
        }
      }
    ]
  },

  "bundle_button_content": {
    "type": "panel",
    "controls": [
      {
        "bundle_coins_stack@coin_purchase.bundle_coins_stack": {}
      },
      {
        "call_out_background": {
          "type": "image",
          "size": [ "100% + 4px", "100% + 4px" ],
          "layer": -8,
          "tiled": "y",
          "texture": "textures/ui/bundle_wide_tile",
          "controls": [
            {
              "bevel": {
                "type": "image",
                "size": [ "100% + 2px", "100% + 2px" ],
                "color": "$coin_screen_callout_bevel_color",
                "layer": 9,
                "texture": "textures/ui/coin_bevel"
              }
            }
          ]
        }
      }
    ]
  },

  "bundle_offer_panel@common_buttons.light_content_button": {
    "$button_size_override": [ "100%", "100%" ],
    "$button_content": "coin_purchase.bundle_button_content",
    "$pressed_button_name": "button.select_offer",
    "$anchor": "top_left",
    "bindings": [
      {
        "binding_type": "$offer_collection_details",
        "binding_collection_name": "$offer_collection_name",
        "binding_collection_prefix": "$offer_collection_prefix"
      },
      {
        "binding_type": "$store_factory_collection_details",
        "binding_collection_name": "$store_factory_collection_name",
        "binding_collection_prefix": "$store_factory_collection_prefix"
      }
    ]
  },

  "bundle_offer_item": {
    "type": "panel",
    "anchor_from": "center",
    "anchor_to": "center",
    "size": [ "100% - 4px", "100% - 6px" ],

    "$store_factory_collection_details|default": "none",
    "$store_factory_collection_prefix|default": "",
    "$store_factory_collection_name|default": "",

    "$offer_collection_details|default": "collection_details",
    "$offer_binding_type|default": "collection",
    "$offer_collection_prefix|default": "offer",
    "$offer_collection_name|default": "offer_collection",

    "$store_offer_grid_item_bindings|default": [
      {
        "binding_type": "$store_factory_collection_details",
        "binding_collection_name": "$store_factory_collection_name",
        "binding_collection_prefix": "$store_factory_collection_prefix"
      },
      {
        "binding_type": "$offer_binding_type",
        "binding_collection_name": "$offer_collection_name",
        "binding_name": "#valid_offer_index",
        "binding_name_override": "#visible"
      }
    ],

    "controls": [
      {
        "offer_panel@coin_purchase.bundle_offer_panel": {
          "layer": 3
        }
      }
    ]
  },

  "bundle_offer_grid_item": {
    "type": "panel",
    "size": "$grid_item_size",
    "$button_image_size": [ "100%", "100%" ],
    "$default_button_texture": "textures/ui/focus_border_white",
    "$hover_button_texture": "textures/ui/focus_border_white",
    "$pressed_button_texture": "textures/ui/focus_border_white",
    "$border_hover_layer": 9,
    "$border_pressed_layer": 9,
    "$grid_item_size": [ "fill", "100%" ],
    "controls": [
      {
        "offer_item@coin_purchase.bundle_offer_item": {
          "$offer_collection_details": "collection_details",
          "$offer_binding_type": "collection",
          "$offer_collection_prefix": "offer",
          "$offer_collection_name": "offer_collection"
        }
      }
    ]
  },

  "bundle_stack_factory": {
    "type": "stack_panel",
    "size": [ "100% - 4px", "72px" ],
    "orientation": "horizontal",
    "$offer_collection_details": "collection_details",
    "$offer_binding_type": "collection",
    "collection_name": "offer_collection",
    "factory": {
      "name": "bundle_factory",
      "control_ids": {
        //left and center tiles will have extra padding, the tile on the right will have no extra padding
        "bundle_padded_tile": "@coin_purchase.bundle_offer_grid_item", //TODO PADDING
        "bundle_rhs_tile": "@coin_purchase.bundle_offer_grid_item"
        //"single_tile": //TODO
      },
      "factory_variables": [
        "$offer_collection_details",
        "$offer_binding_type",
        "$store_factory_collection_details",
        "$store_factory_collection_prefix",
        "$store_factory_collection_name",
        "$section_name"
      ]
    },
    "bindings": [
      {
        "binding_type": "$store_factory_collection_details",
        "binding_collection_name": "$store_factory_collection_name",
        "binding_collection_prefix": "$store_factory_collection_prefix"
      },
      {
        "binding_name": "#coin_bundle_section_content",
        "binding_name_override": "#collection_length",
        "binding_type": "$store_factory_binding_type",
        "binding_collection_name": "$store_factory_collection_name"
      }
    ]
  },

  "bundle_factory_panel": {
    "type": "panel",
    "size": [ "100%", "100%c" ],
    "controls": [
      {
        "bundle_stack_factory@coin_purchase.bundle_stack_factory": {}
      }
    ]
  },

  "bundle_panel": {
    "type": "panel",
    "layer": 1,
    "size": [ "100%", "100%c" ],
    "anchor_from": "top_left",
    "anchor_to": "top_left",
    "controls": [
      {
        "progress_loading_spinner@common_store.progress_loading_spinner": {
          "layer": 100,
          "bindings": [
            {
              "binding_name": "#coin_loading_visible",
              "binding_name_override": "#visible",
              "binding_type": "global"
            },
            {
              "binding_type": "$store_factory_collection_details",
              "binding_collection_name": "$store_factory_collection_name",
              "binding_collection_prefix": "$store_factory_collection_prefix"
            }
          ]
        }
      },
      {
        "loading_background": {
          "type": "image",
          "texture": "textures/ui/banners_no_border",
          "size": [ "100% - 4px", "72px" ],
          "bindings": [
            {
              "binding_name": "#coin_loading_visible",
              "binding_name_override": "#visible",
              "binding_type": "global"
            },
            {
              "binding_type": "$store_factory_collection_details",
              "binding_collection_name": "$store_factory_collection_name",
              "binding_collection_prefix": "$store_factory_collection_prefix"
            }
          ]
        }
      },
      {
        "bundle_stack_factory@coin_purchase.bundle_factory_panel": {
          "layer": 2,
          "bindings": [
            {
              "binding_name": "(not #coin_loading_visible)",
              "binding_name_override": "#visible",
              "binding_type": "global"
            },
            {
              "binding_type": "$store_factory_collection_details",
              "binding_collection_name": "$store_factory_collection_name",
              "binding_collection_prefix": "$store_factory_collection_prefix"
            }
          ]
        }
      }
    ]
  }
}
