using UnityEngine;

namespace Wizard.Battle.View;

public class HandParameter : MonoBehaviour
{
	public enum IconLayout
	{
		Simple,
		FixedUse
	}

	private struct IconLayoutInfo
	{
		public Vector3 _attackPos;

		public Vector3 _lifePos;

		public Vector3 _costPos;
	}

	private static readonly IconLayoutInfo[] ICON_LAYOUT = new IconLayoutInfo[2]
	{
		new IconLayoutInfo
		{
			_attackPos = new Vector3(0f, 0f, 0f),
			_lifePos = new Vector3(0f, -45.73f, 0f),
			_costPos = new Vector3(0f, 0f, 0f)
		},
		new IconLayoutInfo
		{
			_attackPos = new Vector3(0f, -36f, 0f),
			_lifePos = new Vector3(0f, -83.1f, 0f),
			_costPos = new Vector3(0f, 6.3f, 0f)
		}
	};

	[SerializeField]
	public GameObject _attackIcon;

	[SerializeField]
	public UILabel _attackLabel;

	[SerializeField]
	public GameObject _lifeIcon;

	[SerializeField]
	public UILabel _lifeLabel;

	[SerializeField]
	public GameObject _costIcon;

	[SerializeField]
	public UILabel _costLabel;

	[SerializeField]
	public UISprite _costSprite;

	public void InitIconPos(IconLayout layout)
	{
		_attackIcon.transform.localPosition = ICON_LAYOUT[(int)layout]._attackPos;
		_lifeIcon.transform.localPosition = ICON_LAYOUT[(int)layout]._lifePos;
		_costIcon.transform.localPosition = ICON_LAYOUT[(int)layout]._costPos;
	}
}
