{
  "namespace": "redstone",
  //---------------------------------------------------------------------------
  // Screens
  //---------------------------------------------------------------------------

  "item_dropper_label": {
    "type": "label",
    "offset": [ 0, 5 ],
    "anchor_from": "top_middle",
    "anchor_to": "top_middle",
    "color": "$title_text_color",
    "text": "$container_title",
    "layer": 2
  },

  "dispenser_label@item_dropper_label": {
  },

  "dropper_label@item_dropper_label": {
  },

  "hopper_label@item_dropper_label": {
    "offset": [ 7, 7 ],
    "anchor_from": "top_left",
    "anchor_to": "top_left"
  },

  "redstone_input_grid": {
    "type": "grid",
    "anchor_from": "center",
    "anchor_to": "center",
    "offset": "$grid_offset",
    "grid_dimensions": "$grid_dimensions",
    "collection_name": "container_items",
    "grid_item_template": "common.container_item",
    "$item_collection_name": "container_items"
  },

  "redstone_panel_top_half": {
    "type": "panel",
    "size": [ "100%", "50% - 12px" ],
    "offset": [ 0, 7 ],
    "anchor_to": "top_left",
    "anchor_from": "top_left",
    "controls": [
      { "redstone_input_grid@redstone_input_grid": { } }
    ]
  },

  "panel": {
    "type": "panel",
    "controls": [
      { "container_gamepad_helpers@common.container_gamepad_helpers": {} },
      { "selected_item_details_factory@common.selected_item_details_factory": {} },
      { "item_lock_notification_factory@common.item_lock_notification_factory": {} },
      {
        "root_panel@common.root_panel": {
          "layer": 1,
          "size": "$screen_dimensions",
          "controls": [
            { "common_panel@common.common_panel": {} },
            {
              "redstone_screen_inventory": {
                "type": "panel",
                "layer": 5,
                "controls": [
                  { "red_panel@redstone.redstone_panel_top_half": {} },
                  { "red_bottom_half@common.inventory_panel_bottom_half_with_label": {} },
                  { "hotbar_grid@common.hotbar_grid_template": {} },
                  { "red_hold_icon@common.inventory_take_progress_icon_button": {} }
                ]
              }
            },
            { "red_icon@common.inventory_selected_icon_button": {} },
            { "gamepad_cursor@common.gamepad_cursor_button": {} },
            { "$screen_label@$screen_label": {} }
          ]
        }
      },
      { "flying_item_renderer@common.flying_item_renderer": {} }
    ]
  },

  "hopper_screen@common.inventory_screen_common": {
    "$close_on_player_hurt|default": true,
    "$use_custom_pocket_toast|default": false,
    "close_on_player_hurt": "$close_on_player_hurt",
    "use_custom_pocket_toast": "$use_custom_pocket_toast",
    "variables": [
      {
        "requires": "$desktop_screen",
        "$screen_label": "redstone.hopper_label",
        "$screen_dimensions": [ 176, 133 ],
        "$grid_dimensions": [ 5, 1 ],
        "$grid_offset": [ 0, -7 ],
        "$screen_content": "redstone.panel",
        "$screen_bg_content": "common.screen_background",
        "$screen_background_alpha": 0.4
      },
      {
        "requires": "$pocket_screen",
        "$use_custom_pocket_toast": true,
        "$screen_content": "pocket_containers.hopper_panel"
      }
    ]
  },

  "dispenser_screen@common.inventory_screen_common": {
    "$close_on_player_hurt|default": true,
    "$use_custom_pocket_toast|default": false,
    "close_on_player_hurt": "$close_on_player_hurt",
    "use_custom_pocket_toast": "$use_custom_pocket_toast",
    "variables": [
      {
        "requires": "$desktop_screen",
        "$screen_label": "redstone.dispenser_label",
        "$screen_dimensions": [ 176, 166 ],
        "$grid_dimensions": [ 3, 3 ],
        "$grid_offset": [ 0, 0 ],
        "$screen_content": "redstone.panel",
        "$screen_bg_content": "common.screen_background",
        "$screen_background_alpha": 0.4
      },
      {
        "requires": "$pocket_screen",
        "$use_custom_pocket_toast": true,
        "$screen_content": "pocket_containers.dispenser_panel"
      }
    ]
  },

  "crafter_screen@common.inventory_screen_common": {
    "$close_on_player_hurt|default": true,
    "close_on_player_hurt": "$close_on_player_hurt",
    "variables": [
      {
        "requires": "$desktop_screen",
        "$screen_label": "redstone.dispenser_label",
        "$screen_dimensions": [ 176, 166 ],
        "$grid_dimensions": [ 3, 3 ],
        "$grid_offset": [ 0, 0 ],
        "$screen_content": "redstone.panel",
        "$screen_bg_content": "common.screen_background",
        "$screen_background_alpha": 0.4
      },
      {
        "requires": "$pocket_screen",
        "$screen_content": "pocket_containers.dispenser_panel"
      }
    ]
  },

  "dropper_screen@common.inventory_screen_common": {
    "$close_on_player_hurt|default": true,
    "$use_custom_pocket_toast|default": false,
    "close_on_player_hurt": "$close_on_player_hurt",
    "use_custom_pocket_toast": "$use_custom_pocket_toast",
    "variables": [
      {
        "requires": "$desktop_screen",
        "$screen_label": "redstone.dropper_label",
        "$screen_dimensions": [ 176, 166 ],
        "$grid_dimensions": [ 3, 3 ],
        "$grid_offset": [ 0, 0 ],
        "$screen_content": "redstone.panel",
        "$screen_bg_content": "common.screen_background",
        "$screen_background_alpha": 0.4
      },
      {
        "requires": "$pocket_screen",
        "$use_custom_pocket_toast": true,
        "$screen_content": "pocket_containers.dropper_panel"
      }
    ]
  }
}
