/*File made by @CrisXolt.
//(c) Don't use any code design without permission!*/
{
  "namespace": "inventory_dx",

  /*//// Top Type Toggles ////*/

  "top_type_toggles": {
    "type": "stack_panel",
    "orientation": "horizontal",
    "size": [ "100%c", 16 ],
    "anchor_from": "top_right",
    "anchor_to": "top_right",
    "offset": [ -3, -18 ],
    "controls": [
      { 
        "left_panel": {
          "type": "panel",
          "size": [ 0, 16 ],
          "controls": [
            {
              "gamepad_helper_left_trigger@common.gamepad_helper_left_trigger": {
                "offset": [ -30, -5 ],
                "anchor_from": "top_left",
                "anchor_to": "top_left",
                "$hide_description": true
              }
            }
          ]
        }
      },
      { "creative_layout_toggle@inventory_dx.creative_layout_toggle_top": { } },
      { 
        "panel_0": { 
          "type": "panel",
          "size": [ 8, 1 ],
          "bindings": [
            {
              "binding_type": "global",
              "binding_name": "#creative_layout_button_visible",
              "binding_name_override": "#visible"
            }
          ]
        }
      },
      { "recipe_book_layout_toggle@inventory_dx.recipe_book_layout_toggle_top": { } },
      { "panel_1": { "type": "panel", "size": [ 8, 1 ] } },
      { "survival_layout_toggle@inventory_dx.survival_layout_toggle_top": { } },
      { 
        "right_panel": {
          "type": "panel",
          "size": [ 0, 16 ],
          "controls": [
            {
              "gamepad_helper_right_trigger@common.gamepad_helper_right_trigger": {
                "offset": [ 30, -5 ],
                "anchor_from": "top_right",
                "anchor_to": "top_right",
                "$hide_description": true
              }
            }
          ]
        }
      }
    ]
  },

  "inventory_icon": {
    "type": "image",
    "size": [ 16, 16 ],
    "layer": 6,
    "color": "$text_color",
    "texture": "textures/uidx/icons/inventory_layout"
  },

  "recipe_book_icon": {
    "type": "image",
    "size": [ 16, 16 ],
    "layer": 6,
    "color": "$text_color",
    "texture": "textures/uidx/icons/recipe_book_layout"
  },

  "creative_icon": {
    "type": "image",
    "size": [ 16, 16 ],
    "layer": 6,
    "color": "$text_color",
    "texture": "textures/uidx/icons/creative_layout"
  },

  "layout_toggle@common_toggles_dx.toggle_panel": {
    "size": [ 16, 16 ],
    "$toggle_name": "layout_toggle",

    "$unchecked_control": "chat_dx.black_button_default",
    "$unchecked_hover_control": "chat_dx.black_button_hover",
    "$checked_control": "chat_dx.black_button_hover",
    "$checked_hover_control": "chat_dx.black_button_hover"
  },

  "creative_layout_toggle_top@inventory_dx.layout_toggle": {
    "$button_content": "inventory_dx.creative_icon",
    "$toggle_group_forced_index": "$creative_layout_index",

    "$toggle_binding_type": "global",
    "$toggle_state_binding_name": "#is_creative_layout",

    "$focus_id": "creative_layout_toggle",

    "bindings": [
      {
        "binding_type": "global",
        "binding_name": "#creative_layout_button_visible",
        "binding_name_override": "#visible"
      }
    ]
  },

  "recipe_book_layout_toggle_top@inventory_dx.layout_toggle": {
    "$button_content": "inventory_dx.recipe_book_icon",
    "$toggle_group_forced_index": "$recipe_book_layout_index",

    "$toggle_binding_type": "global",
    "$toggle_state_binding_name": "#is_recipe_book_layout",

    "$focus_id": "recipe_book_layout_toggle"
  },

  "survival_layout_toggle_top@inventory_dx.layout_toggle": {
    "$button_content": "inventory_dx.inventory_icon",
    "$toggle_group_forced_index": "$survival_layout_index",

    "$toggle_binding_type": "global",
    "$toggle_state_binding_name": "#is_survival_layout"
  },

  /*//// 2x2 Crafting panel ////*/

  "crafting_cell_images@common_dx.container_cell_images": {
    "controls": [
      { "cell_red_slot@inventory_dx.cell_red_slot": {} },
      { "cell_image@java_gui_common.cell_image": {} }
    ]
  },

  "cell_red_slot@common_dx.cell_image_3": {
    "$cell_image_size": [ 16, 16 ],
    "layer": 2,
    "$texture_image": "java_gui_common.cell_red_slot",
    "controls": [
      { "texture@$texture_image": { } },
      {
        "warning_icon": {
          "type": "image",
          "layer": 5,
          "anchor_from": "top_left",
          "anchor_to": "top_left",
          "offset": [ 1, 1 ],
          "texture": "textures/uidx/highlight/warning_icon",
          "size": [ 8, 8 ]
        }
      }
    ]
  },

  "2x2_crafting_panel": {
    "type": "panel",
    "anchor_from": "top_right",
    "anchor_to": "top_right",
    "size": [ 74, 46 ],
    "offset": [ -5, 7 ],
    "$highlight_slot_image": "java_gui_common.highlight_slot",
    "controls": [
      {
        "crafting_label@crafting.crafting_label": {
          "color": "$vdx_container_title_text_color",
          "anchor_from": "top_left",
          "anchor_to": "top_left",
          "offset": [ 0, 0 ],
          "size": [ "default", 10 ]
        }
      },
      {
        "crafting_grid_2x2@crafting.crafting_grid_2x2": {
          "anchor_from": "top_left",
          "anchor_to": "top_left",
          "offset": [ 0, 10 ],
          "controls": [
            {
              "crafting_input_item_top_left@crafting.crafting_input_grid_item": {
                "$background_images": "inventory_dx.crafting_cell_images",
                "$highlight_control": "common_dx.highlight_slot_panel",
                "grid_position": [ 0, 0 ],
      
                "$focus_id_binding_type": "none",
                "$focus_id": "crafting_input_top_left",
      
                "$focus_override_left_binding_type": "none",
                "$focus_override_left": "armor_item_head"
              }
            },
            {
              "crafting_input_item_top_right@crafting.crafting_input_grid_item": {
                "$background_images": "inventory_dx.crafting_cell_images",
                "$highlight_control": "common_dx.highlight_slot_panel",
                "grid_position": [ 1, 0 ],
      
                "$focus_id_binding_type": "none",
                "$focus_id": "crafting_input_top_right",
      
                "$focus_override_right_binding_type": "none",
                "$focus_override_right": "crafting_output_item"
              }
            },
            {
              "crafting_input_item_bot_left@crafting.crafting_input_grid_item": {
                "$background_images": "inventory_dx.crafting_cell_images",
                "$highlight_control": "common_dx.highlight_slot_panel",
                "grid_position": [ 0, 1 ],
      
                "$focus_id_binding_type": "none",
                "$focus_id": "crafting_input_mid_left",
      
                "$focus_override_left_binding_type": "none",
                "$focus_override_left": "armor_item_legs"
              }
            },
            {
              "crafting_input_item_bot_right@crafting.crafting_input_grid_item": {
                "$background_images": "inventory_dx.crafting_cell_images",
                "$highlight_control": "common_dx.highlight_slot_panel",
                "grid_position": [ 1, 1 ],
      
                "$focus_override_right_binding_type": "none",
                "$focus_override_right": "crafting_output_item"
              }
            }
          ]
        }
      },/* 
      {
        "crafting_table@crafting.item_renderer": {
          "anchor_from": "top_right",
          "anchor_to": "top_right",
          "offset": [ -20, 21 ],
          "layer": 5,
          "property_bag": {
            "#item_id_aux": 3801088
          },
          "bindings": [
            {
              "binding_type": "view",
              "source_control_name": "content",
              "resolve_sibling_scope": true,
              "source_property_name": "(#needs_crafting_table)",
              "target_property_name": "#visible"
            }
          ]
        }
      },*/
      {
        "survival_crafting_output_grid@crafting.output_grid_2x2": {
          "anchor_from": "top_right",
          "anchor_to": "top_right",
          "offset": [ 0, 20 ],
          "controls": [
            {
              "work_bench_output@crafting.inventory_container_item": {
                "$background_images": "inventory_dx.crafting_cell_images",
                "$highlight_control": "common_dx.highlight_slot_panel",
                "$item_collection_name": "crafting_output_items",
                "$button_ref": "crafting.output_no_coalesce_container_slot_button",
                "$item_renderer_binding_condition": "always",
                "$stack_count_binding_condition": "always",
      
                "$focus_id_binding_type": "none",
                "$focus_id": "crafting_output_item",
                "$focus_override_left_binding_type": "none",
                "$focus_override_left": "crafting_input_top_right",
                "$focus_override_up_binding_type": "none",
                "$focus_override_up": "help_button"
              }
            }
          ]
        }
      }
    ]
  },

  /*//// Inventory Panel ////*/
  
  "armor_grid": {
    "type": "grid",
    "layer": 1,
    "size": [ 18, 72 ],
    "anchor_from": "top_left",
    "anchor_to": "top_left",
    "offset": [ 7, 7 ],
    "grid_dimensions": [ 1, 4 ],
    "$item_collection_name": "armor_items",
    "collection_name": "$item_collection_name",
    "$background_images": "java_gui_common.cell_image",
    "$highlight_control": "common_dx.highlight_slot_panel",
    "controls": [
      {
        "head_grid_item@common.container_item": {
          "grid_position": [ 0, 0 ],
          "$cell_overlay_ref": "crafting.armor_overlay_helmet",
          "$button_ref": "crafting.no_coalesce_container_slot_button",

          "$focus_id_binding_type": "none",
          "$focus_id": "armor_item_head",

          "$focus_override_right_binding_type": "none",
          "$focus_override_right": "crafting_input_top_left"
        }
      },
      {
        "chest_grid_item@common.container_item": {
          "grid_position": [ 0, 1 ],
          "$cell_overlay_ref": "crafting.armor_overlay_chest",
          "$button_ref": "crafting.no_coalesce_container_slot_button",

          "$focus_id_binding_type": "none",
          "$focus_id": "armor_item_chest",

          "$focus_override_right_binding_type": "none",
          "$focus_override_right": "crafting_input_top_left"
        }
      },
      {
        "legs_grid_item@common.container_item": {
          "grid_position": [ 0, 2 ],
          "$cell_overlay_ref": "crafting.armor_overlay_legs",
          "$button_ref": "crafting.no_coalesce_container_slot_button",

          "$focus_id_binding_type": "none",
          "$focus_id": "armor_item_legs",

          "$focus_override_right_binding_type": "none",
          "$focus_override_right": "crafting_input_mid_left"
        }
      },
      {
        "feet_grid_item@common.container_item": {
          "grid_position": [ 0, 3 ],
          "$cell_overlay_ref": "crafting.armor_image_feet",
          "$button_ref": "crafting.no_coalesce_container_slot_button",

          "$focus_id_binding_type": "none",
          "$focus_id": "armor_item_feet",

          "$focus_override_right_binding_type": "none",
          "$focus_override_right": "offhand_items0"
        }
      }
    ]
  },

  "offhand_grid": {
    "type": "grid",
    "layer": 1,
    "size": [ 18, 18 ],
    "anchor_from": "top_left",
    "anchor_to": "top_left",
    "offset": [ 76, 61 ],
    "grid_dimensions": [ 1, 1 ],
    "$item_collection_name": "offhand_items",
    "collection_name": "$item_collection_name",
    "$background_images": "java_gui_common.cell_image",
    "$highlight_control": "common_dx.highlight_slot_panel",
    "controls": [
      {
        "offhand_grid_item@common.container_item": {
          "grid_position": [ 0, 0 ],
          "$cell_overlay_ref": "crafting.armor_overlay_shield",
          "$button_ref": "crafting.no_coalesce_container_slot_button",

          "$focus_override_left_binding_type": "none",
          "$focus_override_left": "armor_item_feet"
        }
      }
    ]
  },

  "player_renderer": {
    "type": "panel",
    "anchor_from": "top_left",
    "anchor_to": "top_left",
    "size": [ 51, 72 ],
    "offset": [ 25, 7 ],
    "controls": [
      { "player_bg@java_gui_common.player_bg": { } },
      { "player_preview_border@java_gui_common.player_preview_border": { } },
      {
        "player_renderer_panel": {
          "type": "panel",
          "size": [ 30, 30 ],
          "offset": [ 0, 10.5 ],
          "anchor_from": "top_middle",
          "anchor_to": "top_middle",
          "controls": [
            {
              "player_renderer": {
                "type": "custom",
                "renderer": "live_player_renderer",
                "property_bag": {
                  "#look_at_cursor": true
                },
                "animation_reset_name": "screen_animation_reset",
                "anims": [
                  "@common.screen_exit_size_animation_push",
                  "@common.screen_exit_size_animation_pop",
                  "@common.screen_entrance_size_animation_push",
                  "@common.screen_entrance_size_animation_pop"
                ],
                "layer": 10,
                "anchor_from": "center",
                "anchor_to": "center"
              }
            }
          ]
        }
      }
    ]
  },

  "inventory_panel_top_half": {
    "type": "panel",
    "layer": 4,
    "controls": [
      { "armor_grid@inventory_dx.armor_grid": { } },
      { "player_renderer@inventory_dx.player_renderer": { } },
      { "offhand_grid@inventory_dx.offhand_grid": { } },
      { "2x2_crafting_panel@inventory_dx.2x2_crafting_panel": { } },
      {
        "crafting_arrow_button@inventory_dx.crafting_arrow_button": {
          "size": [ 16, 16 ],
          "offset": [ -25, 28 ],
          "anchor_to": "top_right",
          "anchor_from": "top_right"
        }
      }
    ]
  },

  "crafting_arrow_button": {
    "type": "button",
    "property_bag": {
      "#collection_name": "crafting_output_items",
      "#collection_index": 0
    },
    "button_mappings": [
      {
        "from_button_id": "button.menu_select",
        "to_button_id": "button.crafting_output_tertiary",
        "mapping_type": "pressed"
      },
      {
        "from_button_id": "button.menu_ok",
        "to_button_id": "button.crafting_output_tertiary",
        "mapping_type": "pressed"
      }
    ]
  },

  "player_inventory@common_dx.root_panel": {
    "size": [ 176, 166 ],
    "controls": [
      { "dialog_bg_inventory@inventory_java_dx.dialog_bg_inventory": { "layer": 1 } },
      { "inventory_panel_top_half@inventory_dx.inventory_panel_top_half": { } },
      {
        "inventory_panel_bottom_half@common_dx.inventory_panel_bottom_half": {
          "layer": 2,
          "$with_label": false,
          "$button_ref": "crafting.inventory_container_slot_button"
        }
      }
    ]
  },

  "close_button_panel": {
    "type": "panel",
    "size": [ "100%", "100%" ],
    "bindings": [
      {
        "binding_name": "#close_button_visible",
        "binding_name_override": "#visible"
      }
    ],
    "controls": [
      {
        "close_button@chat_dx.black_button": {
          "$pressed_button_name": "button.menu_exit",
          "$button_content": "inventory_dx.close_icon",
          "anchor_from": "top_right",
          "anchor_to": "top_right",
          "offset": [ 20, 4 ],
          "size": [ 16, 16 ]
        }
      }
    ]
  },
  
  "close_icon": {
    "type": "image",
    "layer": 3,
    "size": [ 16, 16 ],
    "texture": "textures/uidx/icons/close"
  },

  /*//// Panels ////*/

  "inventory_panel": {
    "type": "stack_panel",
    "size": [ "100%c", 166 ],
    "orientation": "horizontal",
    "controls": [
      {
        "creative@creative_new_dx.creative_panel": {
          "bindings": [
            {
              "binding_type": "global",
              "binding_name": "#is_creative_layout",
              "binding_name_override": "#visible"
            }
          ]
        }
      },
      {
        "recipe_book@recipe_book_new_dx.recipe_book": {
          "bindings": [
            {
              "binding_type": "global",
              "binding_name": "#is_recipe_book_layout",
              "binding_name_override": "#visible"
            }
          ]
        }
      },
      {
        "center_fold": {
          "type": "panel",
          "size": [ 4, "100%" ],
          "controls": [
            { 
              "center_fold_texture@recipe_book_bedrock_dx.center_fold_texture": {
                "anchor_from": "top_left",
                "anchor_to": "top_left",
                "offset": [ -7, 0 ]
              }
            }
          ],
          "bindings": [
            {
              "binding_type": "global",
              "binding_name": "#is_recipe_book_layout",
              "binding_name_override": "#visible"
            }
          ]
        }
      },
      {
        "player_inventory@inventory_dx.player_inventory": {
          "bindings": [
            {
              "binding_type": "global",
              "binding_name": "(not #is_creative_layout)",
              "binding_name_override": "#visible"
            }
          ]
        }
      },
      {
        "right_panel": {
          "type": "panel",
          "size": [ 0, "100%" ],
          "controls": [
            { "close_button_panel@inventory_dx.close_button_panel": { } },
            { "top_type_toggles@inventory_dx.top_type_toggles": { } }
          ]
        }
      }
    ],
    "bindings": []
  },

  /*//// Main ////*/

  "main_inventory_screen_content": {
    "type": "panel",
    "$slot_selected_texture": "",
    "$item_lock_cell_size": [ "100%-2px", "100%-2px" ],
    "$item_lock_cell_texture": "textures/uidx/highlight/cell_image_lock",
    "controls": [
      { "inventory_panel@inventory_dx.inventory_panel": { } },
      { "inventory_take_progress_icon_button@common.inventory_take_progress_icon_button": {} },
      { "inventory_selected_icon_button@common_dx.inventory_selected_icon_button": {} }
    ]
  },

  /*//// Screen ////*/

  "container_gamepad_helpers_second_row": {
    "type": "stack_panel",
    "orientation": "horizontal",
    "anchor_from": "bottom_left",
    "anchor_to": "bottom_left",
    "size": [ "100%", 16 ],
    "offset": [ 0, -21 ],
    "controls": [
      {
        "left_thumbstick_visibility": {
          "type": "panel",
          "size": [ "100%c", "100%" ],
          "controls": [
            {
              "gamepad_helper_thumbstick_left@common_tooltip_dx.gamepad_helper_thumbstick_left": {
                "bindings": [
                  {
                    "binding_name": "#gamepad_helper_ls_visible",
                    "binding_name_override": "#visible",
                    "binding_condition": "always"
                  }
                ]
              }
            }
          ]
        }
      },
      {
        "fill_panel": {
          "type": "panel",
          "size": [ "fill", 0 ]
        }
      },
      {
        "right_thumbstick_visibility": {
          "type": "panel",
          "size": [ "100%c", "100%" ],
          "controls": [
            {
              "gamepad_helper_thumbstick_right@common_tooltip_dx.gamepad_helper_thumbstick_right": {
                "bindings": [
                  {
                    "binding_name": "#gamepad_helper_rs_visible",
                    "binding_name_override": "#visible",
                    "binding_condition": "always"
                  }
                ]
              }
            }
          ]
        }
      }
    ]
  },

  "center_screen": {
    "type": "panel",
    "controls": [
      { "container_gamepad_helpers_second_row@inventory_dx.container_gamepad_helpers_second_row": { } },
      { "container_gamepad_helpers@common_tooltip_dx.container_gamepad_helpers": { } },
      { "screen_background@java_gui_common.screen_background": { "layer": -10, "ignored": "(not $is_holographic)" } }
    ]
  },

  "full_screen": {
    "type": "panel",
    "controls": [
      { "main_inventory_screen_content@inventory_dx.main_inventory_screen_content": { } },
      { "screen_background@java_gui_common.screen_background": { "layer": -10, "ignored": "$is_holographic" } }
    ]
  }
}