{
  "namespace": "chest",
    "cash_register_root_panel@small_root_panel": {
      "size": [ 168, 128 ],
      "$chest_panel": "chest.cash_register_top_half"
  },
  "cash_register_grid": {
    "type": "grid",
    "size": [ 92, 100 ],
    "anchor_from": "top_middle",
    "anchor_to": "top_middle",
    "grid_dimensions": [ 5, 1 ],
    "grid_item_template": "chest.chest_grid_item",
    "collection_name": "container_items"
  },
  "cash_register_top_half": {
    "type": "panel",
    "size": [ "100%", "50%" ],
    "offset": [ 0, 12 ],
    "anchor_to": "top_middle",
    "anchor_from": "top_middle",
    "controls": [
      { 
        "cash_register_label@chest.cash_register_label": {
        } 
      },
      {
        "cash_register_grid@chest.cash_register_grid": {
          "offset": [ 0, 9 ]
                }
            }
        ]
    },
  "cash_register_label": {
    "type": "label",
    "offset": [ 7, -1 ],
    "anchor_from": "top_middle",
    "anchor_to": "top_middle",
    "text": "$container_title",
    "size": [ "58%", "default" ],
    "color": "$title_text_color",
    "layer": 2
  },
  
  "fridge_root_panel@small_root_panel": {
      "$hotbar_contents": "chest.fridge_hotbar",
      "$inventory_contents": "chest.fridge_inventory",
      "$dialog_background": "chest.fridge_ui",
      "size": [ 176, 200 ],
      "$chest_panel": "chest.fridge_top_half"
  },
  "fridge_hotbar@chest.hotbar_contents": {
    "$grid_template": "chest.fridge_hotbar_template"
  },
  "fridge_inventory@chest.inventory_contents": {
    "$grid_template": "chest.fridge_inventory_template",
    "$label_color": [ 0.333, 0.333, 0.333 ]
  },
  "fridge_hotbar_template@common.container_item": {
    "$item_collection_name": "hotbar_items"
  },
  "fridge_inventory_template@common.container_item": {
    "$item_collection_name": "inventory_items"
  },
  "fridge_ui@fridge_ui_common": {
    "texture": "textures/ui/fridge"
  },
  "fridge_cell_image": {
    "type": "image",
    "texture": "textures/ui/fridge_cell",
    "layer": 1
  },
  "fridge_ui_common": {
    "type": "image",
    "texture": "textures/ui/fridge",
    "layer": 1
  },
  "fridge_grid": {
    "type": "grid",
    "size": [ 54, 72 ],
    "anchor_from": "top_middle",
    "anchor_to": "top_middle",
    "grid_dimensions": [ 3, 4 ],
    "grid_item_template": "chest.chest_grid_item",
    "collection_name": "container_items"
  },
  "fridge_top_half":{
    "type": "panel",
      "$background_images": "fridge_cell_image",
      "size": [ "100%", 100 ],
      "offset": [ 0, 11 ],
      "anchor_to": "top_left",
      "anchor_from": "top_left",	
    "controls": [    
          { "fridge_label@chest.fridge_label": {} },
          { 
            "fridge_grid@chest.fridge_grid": {
              "offset": [ 0, 15 ]
              } 
          }
      ]
  },
  "fridge_label": {
    "type": "label",
    "offset": [ 60, 4 ],
    "anchor_from": "top_left",
    "anchor_to": "top_left",
    "text": "$container_title",
    "size": [ "35%", "default" ],
    "color": "$title_text_color",
    "layer": 2
  },
  
  "small_root_panel@common.root_panel": {
    "$chest_panel|default": "chest.small_chest_panel_top_half",
    "layer": 1,
    "controls": [
      {
        "common_panel@common.common_panel": {}
      },
      {
        "chest_panel": {
          "type": "panel",
          "layer": 5,
          "$inventory_contents|default": "common.inventory_panel_bottom_half_with_label",
          "$hotbar_contents|default": "common.hotbar_grid_template",
          "controls": [
            {
              "small_chest_panel_top_half@$chest_panel": {}
            },
            {
              "inventory_panel_bottom_half_with_label@$inventory_contents": {}
            },
            {
              "hotbar_grid@$hotbar_contents": {}
            },
            {
              "inventory_take_progress_icon_button@common.inventory_take_progress_icon_button": {}
            }
          ]
        }
      },
      {
        "inventory_selected_icon_button@common.inventory_selected_icon_button": {}
      },
      {
        "gamepad_cursor@common.gamepad_cursor_button": {}
      }
    ]
  },
  "inventory_contents@common.inventory_panel_bottom_half_with_label": {
    "controls": [
      {
        "inventory_panel": {
          "type": "panel",
          "size": [
            88,
            83
          ],
          "anchor_from": "bottom_middle",
          "anchor_to": "bottom_middle",
          "controls": [
            {
              "inventory_grid": {
                "type": "grid",
                "size": [
                  162,
                  54
                ],
                "anchor_from": "bottom_middle",
                "anchor_to": "bottom_middle",
                "offset": [
                  0,
                  -26
                ],
                "grid_dimensions": [
                  9,
                  3
                ],
                "grid_item_template": "$grid_template",
                "collection_name": "inventory_items"
              }
            }
          ]
        }
      },
      {
        "inventory_label@common.section_heading_label": {
          "anchor_from": "top_left",
          "anchor_to": "top_left",
          "offset": [
            7,
            3
          ],
          "layer": 2,
          "color": "$label_color",
          "text": "container.inventory"
        }
      }
    ]
  },
  "hotbar_contents@common.hotbar_grid_template": {
    "grid_item_template": "$grid_template"
  },
  "small_chest_panel": {
    "type": "panel",
    "controls": [
      {
        "container_gamepad_helpers@common.container_gamepad_helpers": {}
      },
      {
        "flying_item_renderer@common.flying_item_renderer": {
          "layer": 11
        }
      },
      {
        "selected_item_details_factory@common.selected_item_details_factory": {
          "control_name": "@chest.selected_item_details"
        }
      },
      {
        "item_lock_notification_factory@common.item_lock_notification_factory": {
          "control_name": "@common.item_lock_notification"
        }
      },
      {
        "root_panel@$root_panel": {}
      }
    ]
  },
  "ender_chest_panel@chest.small_chest_panel": {},
  "small_chest_screen@common.inventory_screen_common": {
    "$close_on_player_hurt|default": true,
    "close_on_player_hurt": "$close_on_player_hurt",
    "$root_panel|default": "chest.small_root_panel",
    "$container_size|default": 27,
    "variables": [
      {
        "requires": "($container_title = 'item.spawn_egg.entity.furniture:fridge_abrir.name')",
        "$root_panel": "chest.fridge_root_panel",
        "$container_size": 3
      },
	  {
        "requires": "($container_title = 'item.spawn_egg.entity.furniture:cash_register.name')",
        "$root_panel": "chest.cash_register_root_panel",
        "$container_size": 5
      },
      {
        "requires": "$desktop_screen",
        "$screen_content": "chest.small_chest_panel",
        "$screen_bg_content": "common.screen_background"
      },
      {
        "requires": "$pocket_screen",
        "$screen_content": "pocket_containers.panel"
      }
    ]
  },
  "ender_chest_screen@common.inventory_screen_common": {
    "$close_on_player_hurt|default": true,
    "close_on_player_hurt": "$close_on_player_hurt",
    "variables": [
      {
        "requires": "$desktop_screen",
        "$screen_content": "chest.small_root_panel",
        "$screen_bg_content": "common.screen_background"
      },
      {
        "requires": "$pocket_screen",
        "$screen_content": "pocket_containers.ender_chest_panel"
      }
    ]
  }
}