using System;
using System.Collections.Generic;
using UnityEngine;
using Wizard.Lottery;

namespace Wizard;

public class MyPageDetail
{
	public enum BGType
	{
		Deck,
		CustomBG,
		RandomBG
	}

	public int unread_mail_count;

	public int last_announce_id;

	public DateTime last_announce_time;

	public int unreceived_mission_reward_count;

	public LotteryLoadTaskData _lotteryData = new LotteryLoadTaskData();

	public List<MyPageBannerBase.BannerInfo> _bannerList;

	public List<MyPageBannerBase.BannerInfo> _subBannerInfoList;

	public bool _isJoinConvention;

	public bool _isAdminWatcher;

	public string _conventionBattleStartTime;

	public bool IsExistUnfinishedBattle { get; set; }

	public bool IsExistUnfinishedRoom { get; set; }

	public int BattleFinishWaitTime { get; set; }

	public float SinceTime { get; set; }

	public double ServerUnixTime { get; set; }

	public MyPageHomeDialogData MyPageHomeDialogData { get; set; } = new MyPageHomeDialogData();

	public bool IsChallangeMissionEnable { get; set; }

	public RoomNonPossessionCardCampaign RoomNonPossessionCardCampaign { get; set; }

	public bool IsPracticePuzzleBadgeEnable { get; set; }

	public bool CanGiveDailyLoginBonus { get; set; }

	public MyPageBGInfo BGInfo { get; set; } = new MyPageBGInfo();

	public SpeedChallengeInfo SpeedChallengeInfo { get; set; }

	public bool IsRoomNonPossessionCardCampaign()
	{
		if (RoomNonPossessionCardCampaign == null)
		{
			return false;
		}
		double nowUnixTime = GetNowUnixTime();
		if (nowUnixTime < RoomNonPossessionCardCampaign.StartUnixTime || nowUnixTime >= RoomNonPossessionCardCampaign.EndUnixTime)
		{
			return false;
		}
		return true;
	}

	public int GetRoomNonPossessionCardCampaignRemainTimeSec()
	{
		return (int)RoomNonPossessionCardCampaign.EndUnixTime - (int)GetNowUnixTime();
	}

	private double GetNowUnixTime()
	{
		return ServerUnixTime + (double)Time.realtimeSinceStartup - (double)SinceTime;
	}
}
