using UnityEngine;

namespace Wizard;

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

	[SerializeField]
	private UITexture _textureCountry;

	[SerializeField]
	private UITexture _textureRank;

	[SerializeField]
	private UILabel _labelMemberName;

	[SerializeField]
	private UITexture _textureDegree;

	protected void InitializeBase(UserInfoBase userInfo)
	{
		InitializeSimplePlate(userInfo);
	}

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