using UnityEngine;

namespace Wizard;

public class ChatLogPlateLayoutNoMember : ChatLogPlateLayoutBase
{
	[SerializeField]
	private UISprite _spriteBG;

	public override Vector2 GetPlateSize(ChatMessageInfo messageInfo)
	{
		return GetContentSize(messageInfo);
	}

	protected override void OnClearDisplay()
	{
		_spriteBG.gameObject.SetActive(value: true);
	}

	protected override void OnSetDisplayBeforeLoad(ChatMessageInfo messageInfo)
	{
		SetDisplayBG(messageInfo);
	}

	protected override void OnSetDisplayAfterLoad(ChatMessageInfo messageInfo)
	{
	}

	private void SetDisplayBG(ChatMessageInfo messageInfo)
	{
		_spriteBG.gameObject.SetActive(value: true);
		Vector2 plateSize = GetPlateSize(messageInfo);
		_spriteBG.width = (int)plateSize.x;
		_spriteBG.height = (int)plateSize.y;
	}
}
