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

  /*//// Arrow ////*/

  "arrow@trade.arrow": {
    "size": [ 28, 21 ],
    "anchor_from": "top_left",
    "anchor_to": "top_left",
    "controls": [
      { 
        "trade_cross_out_icon@villager_java_dx.trade_cross_out_icon": {
          "bindings": [
            {
              "binding_name": "#cross_out_icon",
              "binding_name_override": "#visible"
            }
          ]
        }
      },
      { "recipe_button@trade.recipe_button": { "ignored": "$pocket_screen" } }
    ]
  },

  /*//// Top Slots ////*/
  
  "recipe_button@trade.recipe_button": {
    "ignored": "$pocket_screen"
  },

  "top_item_slot_renderer@trade.recipe_item_panel": {
    "anchor_from": "top_left",
    "anchor_to": "top_left",
    "size": [ 18, 18 ]
  },

  "top_slot_1@trade_dx.top_item_slot_renderer": {
    "offset": [ 35, 23 ],
    "$item_collection_name": "trade_item_A"
  },

  "top_slot_2@trade_dx.top_item_slot_renderer": {
    "offset": [ 61, 23 ],
    "$item_collection_name": "trade_item_B"
  },

  "top_slot_result@trade_dx.top_item_slot_renderer": {
    "offset": [ 119, 23 ],
    "$item_collection_name": "sell_item"
  },

  /*//// Bottom Slots ////*/

  "bottom_item_slot@trade.trade_item_slot": {
    "anchor_from": "top_left",
    "anchor_to": "top_left",
    "size": [ 18, 18 ],
    "$background_images": "java_gui_common.cell_image",
    "$highlight_control": "common_dx.highlight_slot_panel"
  },

  "bottom_slot_1@trade_dx.bottom_item_slot": {
    "offset": [ 35, 52 ],
    "$item_collection_name": "trade_ingredient1_items"
  },

  "bottom_slot_2@trade_dx.bottom_item_slot": {
    "offset": [ 61, 52 ],
    "$item_collection_name": "trade_ingredient2_items",
    "bindings": [
      {
        "binding_name": "#show_second_trade_slot",
        "binding_name_override": "#visible",
        "binding_type": "global"
      }
    ]
  },

  "bottom_slot_result@trade_dx.bottom_item_slot": {
    "size": [ 26, 26 ],
    "offset": [ 115, 48 ],
    "$button_ref": "trade.trade_item_slot_result_button",
    "$item_collection_name": "trade_result_item",
    "$recipe_collection": "sell_item",
    "$cell_overlay_ref": "trade.greyed_item_panel",
    "$background_images": "java_gui_common.cell_image_output",
    "$highlight_slot_image": "java_gui_common.highlight_slot_output"
  },

  /*//// Cycle Buttons ////*/

  "cycle_recipe_button@common.button": {
    "size": [ 12, 19 ],
    "locked_control": "locked",
    "bindings": [
      {
        "binding_type": "global",
        "binding_condition": "visible",
        "binding_name": "$cycle_binding_name",
        "binding_name_override": "#enabled"
      },
      {
        "binding_name": "(not #is_using_gamepad)",
        "binding_name_override": "#focus_enabled"
      }
    ]
  },

  "cycle_recipe_left_button@trade_dx.cycle_recipe_button": {
    "anchor_from": "top_left",
    "anchor_to": "top_left",
    "offset": [ 17, 23 ],
    "$cycle_binding_name": "#left_button_enabled",
    "$pressed_button_name": "button.cycle_recipe_left",
    "controls": [
      { "default@villager_java_dx.chevron_left_default": { } },
      { "hover@villager_java_dx.chevron_left_hover": { } },
      { "pressed@villager_java_dx.chevron_left_default": { } },
      { "locked@villager_java_dx.chevron_left_locked": { } }
    ]
  },

  "cycle_recipe_right_button@trade_dx.cycle_recipe_button": {
    "anchor_from": "top_right",
    "anchor_to": "top_right",
    "offset": [ -17, 23 ],
    "$cycle_binding_name": "#right_button_enabled",
    "$pressed_button_name": "button.cycle_recipe_right",
    "controls": [
      { "default@villager_java_dx.chevron_right_default": { } },
      { "hover@villager_java_dx.chevron_right_hover": { } },
      { "pressed@villager_java_dx.chevron_right_default": { } },
      { "locked@villager_java_dx.chevron_right_locked": { } }
    ]
  },

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

  
  "trade_item_slotB_cell_image@villager_java_dx.trade_item_slotB_cell_image": {
    "size": [ 18, 18 ],
    "anchor_from": "top_left",
    "anchor_to": "top_left",
    "offset": [ 61, 52 ],
    "layer": 2,
    "bindings": [
      {
        "binding_name": "#show_second_trade_slot",
        "binding_name_override": "#visible",
        "binding_type": "global"
      }
    ]
  },

  "trade_panel_top_half": {
    "type": "panel",
    "layer": 4,
    "controls": [
      {
        "villager_name_label@common.section_heading_label": {
          "color": "$vdx_container_title_text_color",
          "text": "$villager_name",
          "anchor_from": "top_middle",
          "anchor_to": "top_middle",
          "offset": [ 0, 5 ]
        }
      },
      { "cycle_recipe_left_button@trade_dx.cycle_recipe_left_button": {} },
      { "cycle_recipe_right_button@trade_dx.cycle_recipe_right_button": {} },
      { "top_slot_1@trade_dx.top_slot_1": {} },
      { "top_slot_2@trade_dx.top_slot_2": {} },
      { "top_slot_result@trade_dx.top_slot_result": {} },
      { "bottom_slot_1@trade_dx.bottom_slot_1": {} },
      { "bottom_slot_2@trade_dx.bottom_slot_2": {} },
      { "bottom_slot_result@trade_dx.bottom_slot_result": {} },
      { "top_arrow@trade_dx.arrow": { "offset": [ 83, 21 ] } },
      { "bottom_arrow@trade_dx.arrow": { "offset": [ 83, 51 ] } },
      { "trade_item_slotB_cell_image@trade_dx.trade_item_slotB_cell_image": { } }
    ]
  },
  
  "trade_panel@common_dx.root_panel": {
    "controls": [
      { "close_button_panel@inventory_dx.close_button_panel": { } },
      { "dialog_bg_trade@villager_java_dx.dialog_bg_trade": { "layer": 1 } },
      { "trade_panel_top_half@trade_dx.trade_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": {} },
      { "trade_panel@trade_dx.trade_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@trade_dx.main_screen_content": { } },
      { "screen_background@java_gui_common.screen_background": { "layer": -10, "ignored": "$is_holographic" } }
    ]
  }
}