class_name AdventurerProfileWindow extends ProfileWindow

var data : Adventurer
@onready var nameLabel = %NameLabel
@onready var jobLabel = %JobLabel
@onready var expLabel : Label = %ExpLabel
@onready var levelLabel :Label = %LevelLabel
@onready var lifeLabel :Label = %LifeLabel
@onready var energyLabel :Label = %EnergyLabel

@onready var strLabel :Label = %STRLabel
@onready var dexLabel :Label = %DEXLabel
@onready var intLabel :Label = %INTLabel
@onready var chaLabel :Label = %CHALabel
@onready var faiLabel :Label = %FAILabel
@onready var lukLabel :Label = %LUKLabel


func setup(adv : Adventurer) -> void:
	data = adv
	nameLabel.text = data.full_name()
	if data.job:
		jobLabel.text = data.job.name
	else:
		jobLabel.text = "ERROR"
	levelLabel.text = str(data.level)
	expLabel.text = "Exp: %d/%d" % [data.exp, data.get_tnl()]
	lifeLabel.text = "Life: " + str(data.life) + "/" + str(data.max_life)
	energyLabel.text = "Energy: " + str(data.energy) + "/" + str(data.max_energy)
	strLabel.text = str(data.stats.STR)
	dexLabel.text = str(data.stats.DEX)
	intLabel.text = str(data.stats.INT)
	chaLabel.text = str(data.stats.CHA)
	faiLabel.text = str(data.stats.FAI)
	lukLabel.text = str(data.stats.LUK)
	#TODO: Show equipment
	populate_items()

func populate_items() -> void:
	pass
