/********************************************************
+*   (c) Mojang. All rights reserved                       *
+*   (c) Microsoft. All rights reserved.                   *
+*********************************************************/

{
  "namespace": "labtable_pocket",

  "title_label@edu_common.dark_label": {
    "layer": 2,
    "text": "labtable.title",
    "size": [ "100%", "default" ],
    "anchor_from": "top_left",
    "anchor_to": "top_left",
    "text_alignment": "center",
    "offset": [ 0, 8 ]
  },

  "input_slot@chem_common_pocket.pocket_ui_container_item": {
    "$item_collection_name": "compcreate_input",
    "$button_ref": "labtable_pocket.one_touch_button"
  },

  "one_touch_button@chem_common_pocket.one_touch_button": {
    "$take_all_place_all": "button.labtable_take_all_place_all",
    "$coalesce_stack": "button.labtable_coalesce_stack"
  },

  "tools_panel": {
    "type": "stack_panel",
    "orientation": "horizontal",
    "size": [ "100%c", 50 ],
    "anchor_from": "center",
    "anchor_to": "center",
    "controls": [
      {
        "beaker@labtable.tool": {
          "$image_size": [ 45, 45 ],
          "$active_texture": "textures/ui/beaker_active",
          "$default_texture": "textures/ui/beaker_default",
          "$active_animation": "@labtable.beaker_animation",
          "$active_binding": "#beaker_active"
        }
      },
      {
        "flask@labtable.tool": {
          "$image_offset": [ -8, 0 ],
          "$image_size": [ 45, 45 ],
          "$active_texture": "textures/ui/flask_active",
          "$active_animation": "@labtable.flask_animation",
          "$default_texture": "textures/ui/flask_default",
          "$active_binding": "#flask_active"
        }
      },
      {
        "jar@labtable.tool": {
          "$image_offset": [ -8, 0 ],
          "$image_size": [ 45, 45 ],
          "$active_texture": "textures/ui/jar_active",
          "$active_animation": "@labtable.jar_animation",
          "$default_texture": "textures/ui/jar_default",
          "$active_binding": "#jar_active"
        }
      }
    ]
  },

  "input_item": {
    "type": "panel",
    "grid_position": "$grid_position",
    "size": [ 24, 24 ],
    "controls": [
      {
        "input_slot@labtable_pocket.input_slot": {
          "$offset|default": [ 0, 0 ],
          "offset": "$offset",
          "$item_collection_name": "labtable_input",
          "$item_renderer_size": [ 20, 20 ]
        }
      }
    ]
  },

  "input_grid": {
    "type": "grid",
    "size": [ 130, 54 ],
    "grid_dimensions": [ 5, 2 ],
    "offset": [ 0, 15 ],
    "collection_name": "labtable_input",
    "controls": [
      {
        "a@labtable_pocket.input_item": {
          "$grid_position": [ 0, 0 ],
          "$offset": [ 13, 0 ]
        }
      },
      {
        "b@labtable_pocket.input_item": {
          "$grid_position": [ 1, 0 ],
          "$offset": [ 13, 0 ]
        }
      },
      {
        "c@labtable_pocket.input_item": {
          "$grid_position": [ 2, 0 ],
          "$offset": [ 13, 0 ]
        }
      },
      {
        "d@labtable_pocket.input_item": {
          "$grid_position": [ 3, 0 ],
          "$offset": [ 13, 0 ]
        }
      },
      {
        "z@labtable_pocket.input_item": {
          "$grid_position": [ 4, 0 ],
          "$offset": [ 0, 27 ]
        }
      },
      {
        "f@labtable_pocket.input_item": {
          "$grid_position": [ 0, 1 ]
        }
      },
      {
        "g@labtable_pocket.input_item": {
          "$grid_position": [ 1, 1 ]
        }
      },
      {
        "h@labtable_pocket.input_item": {
          "$grid_position": [ 2, 1 ]
        }
      },
      {
        "i@labtable_pocket.input_item": {
          "$grid_position": [ 3, 1 ]
        }
      }
    ]
  },

  "combine_button@common.empty_panel": {
    "size": [ "100%", 20 ],
    "controls": [
      {
        "button@common_buttons.light_text_button": {
          "size": [ 120, 28 ],
          "offset": [ 0, 50 ],
          "anchor_from": "center",
          "anchor_to": "top_middle",
          "$button_text": "labtable.combine",
          "$pressed_button_name": "button.combine"
        }
      }
    ],
    "bindings": [
      {
        "binding_name": "#combine_enabled",
        "binding_name_override": "#enabled"
      }
    ]
  },

  "right_panel@common.empty_panel": {
    "size": [ "49.5%", "100%" ],
    "layer": 2,
    "anchor_from": "top_right",
    "anchor_to": "top_right",
    "controls": [
      { "title_label@labtable_pocket.title_label": {} },
      { "dialog_background_opaque@common.dialog_background_opaque": {} },
      {
        "tools@labtable_pocket.tools_panel": {
          "layer": 2,
          "offset": [ 0, -40 ]
        }
      },
      { "input@labtable_pocket.input_grid": {} },
      { "combine@labtable_pocket.combine_button": {} }
    ]
  },

  "content@chem_common_pocket.screen_contents": {
    "$right_panel": "right_panel@labtable_pocket.right_panel"
  }
}
