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

  "pattern_slot_panel": {
    "type": "panel",
    "size": [ 14, 14 ],
    "$cell_image_normal_texture|default": "",
    "controls": [
      { 
        "active_pattern@$cell_image_normal_texture": {
          "size": [ 14, 14 ],
          "bindings": [
            {
              "binding_name": "(#pattern_cell_background_texture = 'textures/ui/cell_image_normal')",
              "binding_name_override": "#visible",
              "binding_type": "collection",
              "binding_collection_name": "$collection_name"
            }
          ]
        }
      },
      { 
        "dark_pattern@loom_java_dx.dark_pattern": {
          "size": [ 14, 14 ],
          "bindings": [
            {
              "binding_name": "(#pattern_cell_background_texture = 'textures/ui/cell_image_invert')",
              "binding_name_override": "#visible",
              "binding_type": "collection",
              "binding_collection_name": "$collection_name"
            }
          ]
        }
      }
    ]
  },

  "active_button_default@loom_dx.pattern_slot_panel": {
    "$cell_image_normal_texture": "loom_java_dx.active_pattern"
  },

  "active_button_hover@loom_dx.pattern_slot_panel": {
    "$cell_image_normal_texture": "loom_java_dx.active_pattern_hover"
  },

  "banner_empty@loom.item_empty_image": {
    "type": "panel",
    "controls": [
      { "banner_empty@loom_java_dx.banner_empty": { } }
    ]
  },

  "dye_empty@loom.item_empty_image": {
    "type": "panel",
    "controls": [
      { "dye_empty@loom_java_dx.dye_empty": { } }
    ]
  },

  "pattern_item_empty@loom.item_empty_image": {
    "type": "panel",
    "controls": [
      { "pattern_item_empty@loom_java_dx.pattern_item_empty": { } }
    ]
  },

  "banner_pattern@loom.banner_pattern": {
    "size": [ 5, 10 ]
  },

  "pattern_slot_button@loom.pattern_slot_button": {
    "size": [ 14, 14 ],
    "default_control": "default",
    "hover_control": "hover",
    "pressed_control": "pressed",
    "controls": [
      { "default@loom_dx.active_button_default": {} },
      { "hover@loom_dx.active_button_hover": {} },
      { "pressed@loom_java_dx.dark_pattern": {} }
    ]
  },

  "pattern_button@loom.pattern_button": {
    "size": [ 14, 14 ],
    "$button_ref": "loom_dx.pattern_slot_button",
    "$banner_pattern_ref": "loom_dx.banner_pattern",
    "$background_images": "common.empty_panel"
  },

  "scroll_grid_panel": {
    "type": "panel",
    "size": [ "100%", "100%c" ],
    "controls": [
      { "grid@loom.scroll_grid": { "$grid_item_template": "loom_dx.pattern_button" } }
    ]
  },

  "scrolling_panel@common_scroll_dx.scrolling_panel": {
    "anchor_to": "top_left",
    "anchor_from": "top_left",
    "offset": [ 60, 13 ],
    "size": [ 71, 56 ],
    "$scroll_size": [ 12, 56 ],
    "$scroll_view_port_size": [ 56, 56 ],
    "$scrolling_pane_size": [ "100%", "100%" ],
    "$scroll_box_image_control": "loom_java_dx.scroll_box",
    "$scrolling_content": "loom_dx.scroll_grid_panel",
    "$collection_name": "patterns"
  },

  "input_slots_panel": {
    "type": "panel",
    "$background_images": "java_gui_common.cell_image",
    "controls": [
      { 
        "input_item_slot@loom.input_item_slot": {
          "anchor_to": "top_left",
          "anchor_from": "top_left",
          "offset": [ 12, 25 ],
          "$cell_overlay_ref": "loom_dx.banner_empty"
        }
      },
      { 
        "dye_item_slot@loom.dye_item_slot": {
          "anchor_to": "top_left",
          "anchor_from": "top_left",
          "offset": [ 32, 25 ],
          "$cell_overlay_ref": "loom_dx.dye_empty"
        }
      },
      { 
        "material_item_slot@loom.material_item_slot": {
          "anchor_to": "top_left",
          "anchor_from": "top_left",
          "offset": [ 22, 44 ],
          "$background_images": "java_gui_common.cell_image",
          "$cell_overlay_ref": "loom_dx.pattern_item_empty"
        }
      }
    ]
  },

  /*//// Output Panel ////*/

  "output_visible_panel_0": {
    "type": "panel",
    "controls": [
      {
        "output_control@$output_control": {
          "bindings": [
            {
              "binding_name": "$output_binding_name",
              "binding_name_override": "#visible",
              "binding_type": "collection",
              "binding_collection_name": "loom_dye_items"
            }
          ]
        }
      }
    ],
    "bindings": [
      {
        "binding_name": "$output_binding_name",
        "binding_name_override": "#visible",
        "binding_type": "collection",
        "binding_collection_name": "loom_input_items"
      }
    ]
  },

  "output_visible_panel_1": {
    "type": "panel",
    "controls": [
      {
        "output_control_0@$output_control": {
          "bindings": [
            {
              "binding_name": "$output_binding_name",
              "binding_name_override": "#visible",
              "binding_type": "collection",
              "binding_collection_name": "loom_input_items"
            }
          ]
        }
      },
      {
        "output_control_1@$output_control": {
          "bindings": [
            {
              "binding_name": "$output_binding_name",
              "binding_name_override": "#visible",
              "binding_type": "collection",
              "binding_collection_name": "loom_dye_items"
            }
          ]
        }
      }
    ]
  },

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

  "locked_scroll_box@loom_java_dx.locked_scroll_box": {
    "anchor_to": "top_left",
    "anchor_from": "top_left",
    "offset": [ 119, 13 ]
  },

  "loom_panel_top_half": {
    "type": "panel",
    "layer": 5,
    "$highlight_control": "common_dx.highlight_slot_panel",
    "controls": [
      {
        "loom_label@loom.loom_label": {
          "color": "$vdx_container_title_text_color",
          "anchor_to": "top_left",
          "anchor_from": "top_left",
          "offset": [ 8, 3 ]
        }
      },
      { "input_slots_panel@loom_dx.input_slots_panel": {} },
      { 
        "result_item_slot@loom.result_item_slot": {
          "$background_images": "java_gui_common.cell_image_output",
          "$highlight_slot_image": "java_gui_common.highlight_slot_output",
          "anchor_to": "top_right",
          "anchor_from": "top_right",
          "offset": [ -12, 52 ],
          "size": [ 26, 26 ]
        }
      },
      {
        "result_banner_renderer@loom.result_banner_renderer": {
          "anchor_to": "top_right",
          "anchor_from": "top_right",
          "layer": 40,
          "size": [ 20, 40 ],
          "offset": [ -15, 8 ]
        }
      },
      { 
        "scrolling_panel@loom_dx.output_visible_panel_0": {
          "$output_binding_name": "(not #empty_image_visible)",
          "$output_control": "loom_dx.scrolling_panel"
        }
      },
      { 
        "locked_scroll_box_0@loom_dx.output_visible_panel_1": {
          "$output_binding_name": "#empty_image_visible",
          "$output_control": "loom_dx.locked_scroll_box"
        }
      }
    ]
  },
  
  "loom_panel@common_dx.root_panel": {
    "controls": [
      { "close_button_panel@inventory_dx.close_button_panel": { } },
      { "dialog_bg_loom@loom_java_dx.dialog_bg_loom": { "layer": 1 } },
      { "loom_panel_top_half@loom_dx.loom_panel_top_half": { } },
      {
        "inventory_panel_bottom_half@common_dx.inventory_panel_bottom_half": {
          "layer": 2,
          "$with_label": true
        }
      }
    ]
  },

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

  "main_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_selected_icon_button@common_dx.inventory_selected_icon_button": {} },
      { "inventory_take_progress_icon_button@common.inventory_take_progress_icon_button": {} },
      { "loom_panel@loom_dx.loom_panel": { } }
    ]
  },
  
  /*//// Screen ////*/

  "center_screen": {
    "type": "panel",
    "controls": [
      { "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_screen_content@loom_dx.main_screen_content": { } },
      { "screen_background@java_gui_common.screen_background": { "layer": -10, "ignored": "$is_holographic" } }
    ]
  }
}