{
    "namespace": "chest_ui_inventory_system",
    "inventory_label": {
        "type": "label",
        "text": "container.inventory",
        "color": "$title_text_color",
        "layer": 2,
        "anchor_from": "bottom_left",
        "anchor_to": "bottom_left",
        "ignored": "(not $show_inventory)"
    },
    "hotbar_items": {
        "type": "stack_panel",
        "size": [
            "default",
            18
        ],
        "orientation": "horizontal",
        "collection_name": "form_buttons",
        "$size": "$condition",
        "$start_index": "(($size - '§c§h§e§s§t' - '§') * 1)",
        "ignored": "(not $show_inventory)",
        "controls": [
            {
                "0@chest_ui_inventory_system.inventory_item_panel": {
                    "collection_index": "$start_index"
                }
            },
            {
                "1@chest_ui_inventory_system.inventory_item_panel": {
                    "collection_index": "($start_index + 1)"
                }
            },
            {
                "2@chest_ui_inventory_system.inventory_item_panel": {
                    "collection_index": "($start_index + 2)"
                }
            },
            {
                "3@chest_ui_inventory_system.inventory_item_panel": {
                    "collection_index": "($start_index + 3)"
                }
            },
            {
                "4@chest_ui_inventory_system.inventory_item_panel": {
                    "collection_index": "($start_index + 4)"
                }
            },
            {
                "5@chest_ui_inventory_system.inventory_item_panel": {
                    "collection_index": "($start_index + 5)"
                }
            },
            {
                "6@chest_ui_inventory_system.inventory_item_panel": {
                    "collection_index": "($start_index + 6)"
                }
            },
            {
                "7@chest_ui_inventory_system.inventory_item_panel": {
                    "collection_index": "($start_index + 7)"
                }
            },
            {
                "8@chest_ui_inventory_system.inventory_item_panel": {
                    "collection_index": "($start_index + 8)"
                }
            }
        ],
        "offset": [
            0,
            0
        ],
        "layer": 1
    },
    "inventory_items": {
        "type": "stack_panel",
        "orientation": "vertical",
        "size": [
            "100%",
            "default"
        ],
        "ignored": "(not $show_inventory)",
        "$size": "$condition",
        "$start_index": "(($size - '§c§h§e§s§t' - '§') * 1)",
        "controls": [
            {
                "stack_1": {
                    "type": "stack_panel",
                    "size": [
                        "default",
                        18
                    ],
                    "orientation": "horizontal",
                    "collection_name": "form_buttons",
                    "controls": [
                        {
                            "0@chest_ui_inventory_system.inventory_item_panel": {
                                "collection_index": "($start_index + 9)"
                            }
                        },
                        {
                            "1@chest_ui_inventory_system.inventory_item_panel": {
                                "collection_index": "($start_index + 10)"
                            }
                        },
                        {
                            "2@chest_ui_inventory_system.inventory_item_panel": {
                                "collection_index": "($start_index + 11)"
                            }
                        },
                        {
                            "3@chest_ui_inventory_system.inventory_item_panel": {
                                "collection_index": "($start_index + 12)"
                            }
                        },
                        {
                            "4@chest_ui_inventory_system.inventory_item_panel": {
                                "collection_index": "($start_index + 13)"
                            }
                        },
                        {
                            "5@chest_ui_inventory_system.inventory_item_panel": {
                                "collection_index": "($start_index + 14)"
                            }
                        },
                        {
                            "6@chest_ui_inventory_system.inventory_item_panel": {
                                "collection_index": "($start_index + 15)"
                            }
                        },
                        {
                            "7@chest_ui_inventory_system.inventory_item_panel": {
                                "collection_index": "($start_index + 16)"
                            }
                        },
                        {
                            "8@chest_ui_inventory_system.inventory_item_panel": {
                                "collection_index": "($start_index + 17)"
                            }
                        }
                    ],
                    "offset": [
                        0,
                        0
                    ],
                    "layer": 1
                }
            },
            {
                "stack_2": {
                    "type": "stack_panel",
                    "size": [
                        "default",
                        18
                    ],
                    "orientation": "horizontal",
                    "collection_name": "form_buttons",
                    "controls": [
                        {
                            "0@chest_ui_inventory_system.inventory_item_panel": {
                                "collection_index": "($start_index + 18)"
                            }
                        },
                        {
                            "1@chest_ui_inventory_system.inventory_item_panel": {
                                "collection_index": "($start_index + 19)"
                            }
                        },
                        {
                            "2@chest_ui_inventory_system.inventory_item_panel": {
                                "collection_index": "($start_index + 20)"
                            }
                        },
                        {
                            "3@chest_ui_inventory_system.inventory_item_panel": {
                                "collection_index": "($start_index + 21)"
                            }
                        },
                        {
                            "4@chest_ui_inventory_system.inventory_item_panel": {
                                "collection_index": "($start_index + 22)"
                            }
                        },
                        {
                            "5@chest_ui_inventory_system.inventory_item_panel": {
                                "collection_index": "($start_index + 23)"
                            }
                        },
                        {
                            "6@chest_ui_inventory_system.inventory_item_panel": {
                                "collection_index": "($start_index + 24)"
                            }
                        },
                        {
                            "7@chest_ui_inventory_system.inventory_item_panel": {
                                "collection_index": "($start_index + 25)"
                            }
                        },
                        {
                            "8@chest_ui_inventory_system.inventory_item_panel": {
                                "collection_index": "($start_index + 26)"
                            }
                        }
                    ],
                    "offset": [
                        0,
                        0
                    ],
                    "layer": 1
                }
            },
            {
                "stack_3": {
                    "type": "stack_panel",
                    "size": [
                        "default",
                        18
                    ],
                    "orientation": "horizontal",
                    "collection_name": "form_buttons",
                    "controls": [
                        {
                            "0@chest_ui_inventory_system.inventory_item_panel": {
                                "collection_index": "($start_index + 27)"
                            }
                        },
                        {
                            "1@chest_ui_inventory_system.inventory_item_panel": {
                                "collection_index": "($start_index + 28)"
                            }
                        },
                        {
                            "2@chest_ui_inventory_system.inventory_item_panel": {
                                "collection_index": "($start_index + 29)"
                            }
                        },
                        {
                            "3@chest_ui_inventory_system.inventory_item_panel": {
                                "collection_index": "($start_index + 30)"
                            }
                        },
                        {
                            "4@chest_ui_inventory_system.inventory_item_panel": {
                                "collection_index": "($start_index + 31)"
                            }
                        },
                        {
                            "5@chest_ui_inventory_system.inventory_item_panel": {
                                "collection_index": "($start_index + 32)"
                            }
                        },
                        {
                            "6@chest_ui_inventory_system.inventory_item_panel": {
                                "collection_index": "($start_index + 33)"
                            }
                        },
                        {
                            "7@chest_ui_inventory_system.inventory_item_panel": {
                                "collection_index": "($start_index + 34)"
                            }
                        },
                        {
                            "8@chest_ui_inventory_system.inventory_item_panel": {
                                "collection_index": "($start_index + 35)"
                            }
                        }
                    ],
                    "offset": [
                        0,
                        0
                    ],
                    "layer": 1
                }
            }
        ]
    },
    "inventory_item_panel": {
        "type": "panel",
        "size": [
            18,
            18
        ],
        "layer": 1,
        "controls": [
            {
                "bg@chest_ui.cell": {}
            },
            {
                "inventory_button_amount@chest_ui.inventory_button_amount": {}
            },
            {
                "inventory_item@chest_ui_inventory_system.inventory_item": {}
            }
        ]
    },
    "inventory_item@common.button": {
        "$pressed_button_name": "button.form_button_click",
        "button_mappings": [
            {
                "from_button_id": "$pressed_button_name",
                "to_button_id": "any",
                "mapping_type": "pressed"
            },
            {
                "from_button_id": "$pressed_button_name",
                "to_button_id": "any",
                "mapping_type": "focused"
            }
        ],
        "bindings": [
            {
                "binding_name": "#form_button_text",
                "binding_type": "collection",
                "binding_collection_name": "form_buttons"
            },
            {
                "binding_type": "collection_details",
                "binding_collection_name": "form_buttons"
            },
            {
                "binding_type": "view",
                "source_property_name": "(not (#form_button_text = ''))",
                "target_property_name": "#visible"
            }
        ],
        "$aux_id": [
            {
                "binding_name": "#form_button_texture",
                "binding_type": "collection",
                "binding_collection_name": "form_buttons"
            },
            {
                "binding_type": "view",
                "source_property_name": "(not (('%.8s' * #form_button_texture) = 'textures'))",
                "target_property_name": "#visible"
            },
            {
                "binding_type": "view",
                "source_property_name": "(not ((#texture = '') or (#texture = 'loading')))",
                "target_property_name": "#visible"
            },
            {
                "binding_type": "view",
                "source_property_name": "(#form_button_texture * 1)",
                "target_property_name": "#item_id_aux"
            }
        ],
        "default_control": "default",
        "hover_control": "hover",
        "pressed_control": "pressed",
        "controls": [
            {
                "default@chest_ui.default_control": {}
            },
            {
                "hover@chest_ui.hover_control": {}
            },
            {
                "pressed@chest_ui.pressed_control": {}
            }
        ]
    }
}