using Cute;
using LitJson;
using Wizard;

public class UserConfig : HeaderData
{
	public string create_time;

	public string update_time;

	public string delete_time;

	public string affected_rows;

	public bool ReceivedInvite { get; set; }

	public bool ReceivedInviteInBattle { get; set; }

	public bool ReceivedInviteInOffline { get; set; }

	public bool ReceivedFriendApply { get; set; }

	public bool ArrowAdjustSend { get; private set; }

	public bool IsFoilPreferred { get; set; }

	public bool IsPrizePreferred { get; set; }

	public void SetArrowAdjustSend(bool arrow)
	{
		ArrowAdjustSend = arrow;
		int num = (arrow ? 1 : 0);
		if (Toolbox.SavedataManager.GetInt("ADJUST_ON", 1) != num)
		{
			Toolbox.SavedataManager.SetInt("ADJUST_ON", num);
			WizardFirebase.OnChangeDataUseEnable();
		}
	}

	public void Parse(JsonData data)
	{
		ReceivedInvite = data["receive_invitation"].ToInt() == 1;
		ReceivedInviteInBattle = data["receive_invitation_in_battle"].ToInt() == 1;
		ReceivedInviteInOffline = data["receive_invitation_in_offline"].ToInt() == 1;
		ReceivedFriendApply = data["receive_friend_apply"].ToInt() == 1;
		SetArrowAdjustSend(data["is_allow_send_adjust"].ToInt() == 1);
		IsFoilPreferred = data["is_foil_preferred"].ToInt() == 1;
		IsPrizePreferred = data["is_prize_preferred"].ToInt() == 1;
	}
}
