extends NinePatchRect

@onready var confirm_button: Button = $Confirm

func _ready() -> void:
	var node_name = str(self.name)
	add_to_group(node_name)
	
	if confirm_button:
		if not confirm_button.pressed.is_connected(_on_confirm_pressed):
			confirm_button.pressed.connect(_on_confirm_pressed)

func _on_confirm_pressed():
	get_parent().start_task()
	self.hide()
	get_parent().close_all_popups()
