extends Area3D

@onready var control: Control = $Control

@onready var multiple_inputs_container: HBoxContainer = %MultipleInputsContainer
@onready var first_input: TextureRect = %FirstInput
@onready var complex_input_label: Label = %ComplexInputLabel
@onready var second_input: TextureRect = %SecondInput
@onready var tuto_label: Label = %TutoText


@export var first_input_texture: CompressedTexture2D
@export var second_input_texture: CompressedTexture2D
@export var complex_input_text: String
@export var tuto_text: String


func _ready() -> void:
	tuto_label.text = tuto_text
	first_input.texture = first_input_texture
	second_input.texture = second_input_texture
	complex_input_label.text = complex_input_text
	
	if second_input_texture != null:
		complex_input_label.text = "+"
	
	if second_input_texture == null and complex_input_text.is_empty():
		complex_input_label.visible = false
		second_input.visible = false


func _on_body_entered(body: Node3D) -> void:
	control.visible = true


func _on_body_exited(body: Node3D) -> void:
	control.visible = false
