using UnityEngine;

namespace Wizard;

public class GuildUserDataDialog : MonoBehaviour
{
	[SerializeField]
	private UITexture _textureEmblem;

	[SerializeField]
	private UITexture _textureCountry;

	[SerializeField]
	private UITexture _textureRank;

	[SerializeField]
	private UITexture _textureDegree;

	[SerializeField]
	private UILabel _labelName;

	[SerializeField]
	private UILabel _labelDiscription;

	public void SetUserData(UserInfoBase userInfo)
	{
		_textureEmblem.mainTexture = userInfo.GetUserEmblemTexture();
		_textureRank.mainTexture = userInfo.GetUserRankTexture();
		userInfo.InitializeDegreeTexture(_textureDegree);
		_textureCountry.mainTexture = userInfo.GetUserCountryTexture();
		_labelName.text = userInfo.Name;
	}

	public void SetDiscriptionLabel(string text)
	{
		_labelDiscription.text = text;
	}
}
