{
  "namespace": "brewing_stand_pocket",

  "generic_label": {
    "type": "label",
    "color": "$pocket_title_text_color",
    "anchor_from": "center",
    "anchor_to": "center"
  },

  // Backgrounds //

  "background_image": {
    "type": "image",
    "size": [ "100%", "100%" ],
    "texture": "textures/ui/background_panel"
  },

  // Output Slot //

  "output_slot@common.pocket_ui_large_container_item": {
    "$item_collection_name": "brewing_result_items",
    "$cell_overlay_ref": "brewing_stand.bottle_empty_image"
  },

  // Slots //

  "brewing_input_slot": {
    "type": "panel",
    "size": [ 32, 32 ],
    "offset": [ -48, 2 ],
    "anchor_from": "top_right",
    "anchor_to": "top_right",
    "controls": [
      {
        "input_slot@common.pocket_ui_large_container_item": {
          "$item_collection_name": "brewing_input_item",
          "$focus_id": "input_slot",
          "$focus_override_left": "fuel_slot"
        }
      }
    ]
  },
  "brewing_fuel_slot": {
    "type": "panel",
    "size": [ 32, 32 ],
    "anchor_from": "top_left",
    "anchor_to": "top_left",
    "controls": [
      {
        "fuel_slot@common.pocket_ui_large_container_item": {
          "$item_collection_name": "brewing_fuel_item",
          "$cell_overlay_ref": "brewing_stand.fuel_empty_image",
          "$focus_id": "fuel_slot",
          "$focus_override_right": "input_slot"
        }
      }
    ]
  },
  "brewing_out_slots": {
    "type": "grid",
    "size": [ 128, 42 ],
    "anchor_from": "bottom_right",
    "anchor_to": "bottom_right",
    "grid_dimensions": [ 3, 1 ],
    "collection_name": "brewing_result_items",
    "controls": [
      {
        "left_offset": {
          "type": "panel",
          "grid_position": [ 0, 0 ],
          "controls": [
            {
              "output_slot1@brewing_stand_pocket.output_slot": {
                "anchor_from": "top_left",
                "anchor_to": "top_left",
                "$focus_override_up": "input_slot"
              }
            }
          ]
        }
      },
      {
        "middle": {
          "type": "panel",
          "grid_position": [ 1, 0 ],
          "controls": [
            {
              "output_slot2@brewing_stand_pocket.output_slot": {
                "anchor_from": "bottom_middle",
                "anchor_to": "bottom_middle"
              }
            }
          ]
        }
      },
      {
        "right_offset": {
          "type": "panel",
          "grid_position": [ 2, 0 ],
          "controls": [
            {
              "output_slot3@brewing_stand_pocket.output_slot": {
                "anchor_from": "top_right",
                "anchor_to": "top_right"
              }
            }
          ]
        }
      }
    ]
  },
  "slots_panel": {
    "type": "panel",
    "size": [ 172, 96 ],
    "controls": [
      {
        "brewing_input_slot@brewing_stand_pocket.brewing_input_slot": {
        }
      },
      {
        "brewing_fuel_slot@brewing_stand_pocket.brewing_fuel_slot": {
        }
      },
      {
        "brewing_out_slots@brewing_stand_pocket.brewing_out_slots": {
        }
      },
      {
        "brewing_arrow_panel": {
          "type": "panel",
          "anchor_from": "top_right",
          "anchor_to": "top_right",
          "size": [ 9, 41 ],
          "offset": [ -31, 9 ],
          "controls": [
            {
              "brewing_arrow_empty_image@brewing_stand.brewing_arrow_empty_image": {
                "layer": 0,
                "texture": "textures/ui/brewing_arrow_large_empty",
                "size": [ 9, 41 ],
                "offset": [ 0, 0 ]
              }
            },
            {
              "brewing_arrow_full_image@brewing_stand.brewing_arrow_full_image": {
                "layer": 1,
                "texture": "textures/ui/brewing_arrow_large_full",
                "size": [ 9, 41 ],
                "offset": [ 0, 0 ]
              }
            }
          ]
        }
      },
      {
        "brewing_bubbles_panel": {
          "type": "panel",
          "size": [ 12, 29 ],
          "offset": [ 64, 6 ],
          "anchor_from": "top_left",
          "anchor_to": "top_left",
          "controls": [
            {
              "bubbles_empty_image@brewing_stand.bubbles_empty_image": {
                "layer": 0,
                "offset": [ 0, 0 ]
              }
            },
            {
              "bubbles_full_image@brewing_stand.bubbles_full_image": {
                "layer": 1,
                "offset": [ 0, 0 ]
              }
            }
          ]
        }
      },
      {
        "brewing_fuel_bar_panel": {
          "type": "panel",
          "size": [ 24, 6 ],
          "offset": [ 58, 35 ],
          "anchor_from": "top_left",
          "anchor_to": "top_left",
          "controls": [
            {
              "brewing_fuel_bar_empty_image@brewing_stand.brewing_fuel_bar_empty_image": {
                "layer": 0,
                "offset": [ 0, 0 ]
              }
            },
            {
              "brewing_fuel_bar_full_image@brewing_stand.brewing_fuel_bar_full_image": {
                "layer": 2,
                "offset": [ 0, 0 ]
              }
            }
          ]
        }
      },
      {
        "brewing_fuel_pipes@brewing_stand.brewing_fuel_pipes": {
          "layer": 3,
          "offset": [ 31, 19 ],
          "anchor_from": "top_left",
          "anchor_to": "top_left"
        }
      },
      {
        "brewing_pipes@brewing_stand.brewing_pipes": {
          "layer": 3,
          "texture": "textures/ui/brewing_pipes_large",
          "size": [ 66, 32 ],
          "offset": [ -31, 33 ],
          "anchor_from": "top_right",
          "anchor_to": "top_right"
        }
      }
    ]
  },

  // Inventory Grids //

  "inventory_grid": {
    "type": "grid",
    "grid_rescaling_type": "horizontal",
    "anchor_to": "top_left",
    "anchor_from": "top_left",
    "size": [ "100%", "default" ],
    "maximum_grid_items": 36,
    "collection_name": "combined_hotbar_and_inventory_items",
    "grid_item_template": "common.pocket_ui_container_item",
    "$item_collection_name": "combined_hotbar_and_inventory_items"
  },

  "inventory_content": {
    "type": "panel",
    "size": [ "80%", "95%" ],
    "anchor_to": "center",
    "anchor_from": "center",
    "controls": [
      {
        "scrolling_panel@common.scrolling_panel": {
          "layer": 1,
          "$scrolling_pane_size": [ "100%", "100%-2px" ],
          "$scrolling_content": "brewing_stand_pocket.inventory_grid",
          "$scroll_box_mouse_image_control": "common-classic.button_state_default",
          "$scroll_size": [ "8px", "100%" ]
        }
      }
    ]
  },

  // Brewing Stand Panel //

  "brewing_stand_contents_panel": {
    "type": "panel",
    "offset": [ 0, "default-4px" ],
    "controls": [
      {
        "slots_panel@slots_panel": {
          "offset": [ -5, -10 ]
        }
      }
    ]

  },

  // Half Screens //

  "half_screen": {
    "type": "input_panel",
    "size": [ "50%-4px", "100%-35px" ],
    "anchor_from": "top_left",
    "anchor_to": "top_left"
  },
  "inventory_half_screen@brewing_stand_pocket.half_screen": {
    "offset": [ 8, 31 ],
    "controls": [
      { "inventory_content@brewing_stand_pocket.inventory_content": {} }
    ]
  },
  "brewing_stand_half_screen@brewing_stand_pocket.half_screen": {
    "offset": [ 8, 31 ],
    "anchor_from": "top_right",
    "anchor_to": "top_right",
    "controls": [
      { "brewing_stand_contents_panel@brewing_stand_pocket.brewing_stand_contents_panel": {} }
    ]
  },

  // Header //

  "header": {
    "type": "panel",
    "size": [ "100%", 28 ],
    "anchor_from": "top_middle",
    "anchor_to": "top_middle",
    "controls": [
      {
        "header_background": {
          "type": "image",
          "texture": "textures/ui/header_bar"
        }
      },
      { "legacy_pocket_close_button@common.legacy_pocket_close_button": {} },
      {
        "panel": {
          "type": "panel",
          "anchor_from": "center",
          "anchor_to": "center",
          "controls": [
            {
              "title_label@brewing_stand_pocket.generic_label": {
                "text": "$container_title",
                "layer": 1
              }
            }
          ]
        }
      }
    ]
  },

  // Brewing Stand Screen //

  "brewing_stand_panel": {
    "type": "panel",
    "controls": [
      { "bg@brewing_stand_pocket.background_image": {} },
      { "root_panel@common.root_panel": {} },
      { "header@brewing_stand_pocket.header": { "layer": 2 } },
      { "inventory@brewing_stand_pocket.inventory_half_screen": {} },
      {
        "brewing_stand_half_screen@brewing_stand_pocket.brewing_stand_half_screen": {
          "layer": 2
        }
      },

      { "container_gamepad_helpers@common.container_gamepad_helpers": { "layer": 2 } },
      { "inventory_selected_icon_button@common.inventory_selected_icon_button": {} },
      { "hold_icon@common.inventory_take_progress_icon_button": {} },
      { "selected_item_details_factory@common.selected_item_details_factory": {} },
      {
        "flying_item_renderer@common.flying_item_renderer": {
          "layer": 10
        }
      }
    ]
  }
}