using System;
using System.Collections;
using UnityEngine;

// Token: 0x02000174 RID: 372
public class ScreenKeyboardManager : MonoBehaviour
{
	// Token: 0x1700015A RID: 346
	// (get) Token: 0x06000A93 RID: 2707 RVA: 0x0002EA38 File Offset: 0x0002CC38
	private static ScreenKeyboardManager Instance
	{
		get
		{
			if (ScreenKeyboardManager.m_instance == null)
			{
				GameObject gameObject = GameObject.Find("_ScreenKeyboardManager");
				if (gameObject == null)
				{
					gameObject = new GameObject("_ScreenKeyboardManager");
				}
				ScreenKeyboardManager.m_instance = gameObject.AddComponent<ScreenKeyboardManager>();
				ScreenKeyboardManager.m_instance.m_inputText = string.Empty;
			}
			return ScreenKeyboardManager.m_instance;
		}
	}

	// Token: 0x1700015B RID: 347
	// (get) Token: 0x06000A94 RID: 2708 RVA: 0x0002EA98 File Offset: 0x0002CC98
	public static string InputText
	{
		get
		{
			return ScreenKeyboardManager.Instance.m_inputText;
		}
	}

	// Token: 0x1700015C RID: 348
	// (set) Token: 0x06000A95 RID: 2709 RVA: 0x0002EAA4 File Offset: 0x0002CCA4
	public static string DebugInputText
	{
		set
		{
			ScreenKeyboardManager.Instance.m_inputText = value;
		}
	}

	// Token: 0x1700015D RID: 349
	// (get) Token: 0x06000A96 RID: 2710 RVA: 0x0002EAB4 File Offset: 0x0002CCB4
	public static bool IsCancel
	{
		get
		{
			return false;
			//return ScreenKeyboardManager.Instance.m_keyboard.wasCanceled;
		}
	}

	// Token: 0x06000A97 RID: 2711 RVA: 0x0002EAC8 File Offset: 0x0002CCC8
	public static IEnumerator Open(string defaultString = "")
	{
		//TODO fix TouchScreenKeyboard issue
		/*ScreenKeyboardManager.Instance.m_inputText = defaultString;
		ScreenKeyboardManager.Instance.m_keyboard = TouchScreenKeyboard.Open(defaultString, TouchScreenKeyboardType.NamePhonePad);
		while (!ScreenKeyboardManager.Instance.m_keyboard.active)
		{
			yield return 0;
		}
		while (ScreenKeyboardManager.Instance.m_keyboard.active)
		{
			yield return 0;
		}
		if (ScreenKeyboardManager.Instance.m_keyboard.done)
		{
			ScreenKeyboardManager.Instance.m_inputText = ScreenKeyboardManager.Instance.m_keyboard.text;
		}*/
		yield break;
	}

	// Token: 0x06000A98 RID: 2712 RVA: 0x0002EAEC File Offset: 0x0002CCEC
	public static void Close()
	{
		if (ScreenKeyboardManager.m_instance != null)
		{
			UnityEngine.Object.Destroy(ScreenKeyboardManager.m_instance.gameObject);
			ScreenKeyboardManager.m_instance = null;
		}
	}

	// Token: 0x04000885 RID: 2181
	private static ScreenKeyboardManager m_instance;

	// Token: 0x04000886 RID: 2182
	//private TouchScreenKeyboard m_keyboard;

	// Token: 0x04000887 RID: 2183
	private string m_inputText;
}
