class_name RootUI extends Control

@export var debugMenu:DebugMenu
@export var gameMenu:GameMenu
@export var pauseMenu:PauseMenu
@export var quitConfirmDialog:QuitConfirmDialog
@export var mainMenuConfirmDialog:ConfirmDialog
@export var modalBackdrop:ModalBackdrop
@export var chatBoxContainer:Control

func _enter_tree() -> void:
  UI.rootUi = self

func _exit_tree() -> void:
  if UI.rootUi == self:
    UI.rootUi = null

func _ready() -> void:
  modalBackdrop.register(pauseMenu)
  modalBackdrop.register(quitConfirmDialog)
  modalBackdrop.register(mainMenuConfirmDialog)
