extends VBoxContainer

## NEO-75: collapsible economy HUD block (inventory, skills, craft panel).

@onready var _toggle: CheckButton = $HeaderRow/ToggleButton
@onready var _body: VBoxContainer = $Body


func _ready() -> void:
	_toggle.button_pressed = true
	_body.visible = true
	_toggle.toggled.connect(_on_toggle_toggled)


func _on_toggle_toggled(pressed: bool) -> void:
	_body.visible = pressed


func set_expanded(expanded: bool) -> void:
	_toggle.button_pressed = expanded
	_body.visible = expanded


func is_body_visible() -> bool:
	return _body.visible
