using Wizard;

namespace Cute;

public class DataMigration
{
	public enum status
	{
		NONE,
		OVER,
		FAIL
	}

	private static bool inProgress;

	public static bool canCombine()
	{
		if (Certification.ViewerId != 0)
		{
			return true;
		}
		return false;
	}

	public static void CombineStart(string url)
	{
		BrowserURL.Open(url);
		inProgress = true;
	}

	public static bool isCombineSucceed()
	{
		if (Toolbox.SavedataManager.GetInt("COMBINED") != 1)
		{
			return false;
		}
		return true;
	}

	public static bool isProgressing()
	{
		return inProgress;
	}

	public static void ProgressOver()
	{
		inProgress = false;
		URLScheme.Clear();
	}

	public static void CombineSucceed()
	{
		Toolbox.SavedataManager.SetInt("COMBINED", 1);
	}

	public static void CombineFailed()
	{
	}

	public static void MigrationStart(string url)
	{
		BrowserURL.Open(url);
		inProgress = true;
	}

	public static void MigrationSucceed()
	{
		CombineSucceed();
	}

	public static void MigrationFailed()
	{
	}
}
