using UnityEngine;
using Wizard;
using Wizard.Dialog.Setting;

public class DeckDecisionCompetition : MonoBehaviour
{
	[SerializeField]
	private UILabel _descTextLabel;

	[SerializeField]
	private UILabel _deckNameTextLabel;

	[SerializeField]
	private UILabel _descText2Label;

	[SerializeField]
	private ItemToggle _toggle;

	public void Init(DeckData inDeck)
	{
		_descTextLabel.text = Data.SystemText.Get("Card_0006");
		_deckNameTextLabel.text = Data.SystemText.Get("Card_0299", inDeck.GetDeckName());
		_descText2Label.text = Data.SystemText.Get("Colosseum_0081");
		SettingToggle();
	}

	protected ItemToggle SettingToggle()
	{
		SystemText systemText = Data.SystemText;
		ItemToggle item = _toggle;
		item.SetTitleLabel(systemText.Get("Colosseum_0085"));
		item.SetValue(PlayerPrefsWrapper.GetBool(PlayerPrefsWrapper.COMPETITION_PUBLISHED_SETTING));
		item.AddChangeCallback(delegate
		{
			bool value = item.GetValue();
			PlayerPrefsWrapper.SetBool(PlayerPrefsWrapper.COMPETITION_PUBLISHED_SETTING, value);
		});
		item.SetActive_SeparatorLine(isActive: true);
		return item;
	}
}
