// Path: core/src/de/tomgrill/gdxdialogs/core/GDXDialogsVars.java
// public class GDXDialogsVars {
// 	public static final String VERSION = "1.3.0";
// 	public static final String LOG_TAG = "gdx-dialogs (" + VERSION + ")";
// }
// 
// Path: core/src/de/tomgrill/gdxdialogs/core/dialogs/GDXTextPrompt.java
// public interface GDXTextPrompt {
// 
// 	/**
// 	 * Type of input used by the textfield
// 	 */
// 	enum InputType {
// 		/**
// 		 * prints readable text
// 		 */
// 		PLAIN_TEXT,
// 
// 		/**
// 		 * hides typed text behind specified character
// 		 */
// 		PASSWORD
// 	}
// 
// 	/**
// 	 * Sets the title
// 	 *
// 	 * @param title String value to set the title
// 	 * @return The same instance that the method was called from.
// 	 */
// 	GDXTextPrompt setTitle(CharSequence title);
// 
// 
// 	/**
// 	 * Set the character limit for input. Default is 16.
// 	 *
// 	 * @param maxLength
// 	 * @return
// 	 */
// 	GDXTextPrompt setMaxLength(int maxLength);
// 
// 	/**
// 	 * Shows the dialog. show() can only be called after build() has been called
// 	 * else there might be strange behavior. Runs asynchronously on a different thread.
// 	 *
// 	 * @return The same instance that the method was called from.
// 	 */
// 	GDXTextPrompt show();
// 
// 	/**
// 	 * Dismisses the dialog. You can show the dialog again.
// 	 *
// 	 * @return The same instance that the method was called from.
// 	 */
// 	GDXTextPrompt dismiss();
// 
// 	/**
// 	 * This builds the button and prepares for usage.
// 	 *
// 	 * @return The same instance that the method was called from.
// 	 */
// 	GDXTextPrompt build();
// 
// 	/**
// 	 * Sets the message.
// 	 *
// 	 * @param message The text to be displayed at the body of the dialog. Desktop implementation will ignore this method.
// 	 * @return The same instance that the method was called from.
// 	 */
// 	GDXTextPrompt setMessage(CharSequence message);
// 
// 	/**
// 	 * Sets the default value for the input field.
// 	 *
// 	 * @param inputTip Placeholder for the text input field.
// 	 * @return The same instance that the method was called from.
// 	 */
// 	GDXTextPrompt setValue(CharSequence inputTip);
// 
// 	/**
// 	 * Sets the label for the cancel button on the dialog.
// 	 *
// 	 * @param label Text of the cancel button
// 	 * @return The same instance that the method was called from.
// 	 */
// 	GDXTextPrompt setCancelButtonLabel(CharSequence label);
// 
// 	/**
// 	 * Sets the label for the confirm button on the dialog.
// 	 *
// 	 * @param label Text of the confirm button
// 	 * @return The same instance that the method was called from.
// 	 */
// 	GDXTextPrompt setConfirmButtonLabel(CharSequence label);
// 
// 	/**
// 	 * Sets the {@link TextPromptListener}
// 	 *
// 	 * @param listener listener to be called when the event is triggered
// 	 * @return The same instance that the method was called from.
// 	 */
// 	GDXTextPrompt setTextPromptListener(TextPromptListener listener);
// 
// 	/**
// 	 * Sets the type of input for the text input field.
// 	 *
// 	 * @param inputType type of input
// 	 * @return The same instance that the method was called from.
// 	 */
// 	GDXTextPrompt setInputType(InputType inputType);
// }
// 
// Path: core/src/de/tomgrill/gdxdialogs/core/listener/TextPromptListener.java
// public interface TextPromptListener {
// 
// 	public void cancel();
// 
// 	public void confirm(String text);
// 
// }


import apple.foundation.struct.NSRange;
import apple.uikit.protocol.UITextFieldDelegate;
import com.badlogic.gdx.Gdx;
import org.moe.natj.general.ann.ByValue;
import org.moe.natj.general.ann.NInt;
import de.tomgrill.gdxdialogs.core.GDXDialogsVars;
import de.tomgrill.gdxdialogs.core.dialogs.GDXTextPrompt;
import de.tomgrill.gdxdialogs.core.listener.TextPromptListener;
import apple.uikit.UIAlertView;
import apple.uikit.UITextField;
import apple.uikit.enums.UIAlertViewStyle;
import apple.uikit.protocol.UIAlertViewDelegate;
	public GDXTextPrompt setConfirmButtonLabel(CharSequence label) {
		this.confirmLabel = (String) label;
		return this;
	}

	@Override
	public GDXTextPrompt setTextPromptListener(TextPromptListener listener) {
		this.listener = listener;
		return this;
	}

	@Override
	public GDXTextPrompt setInputType(InputType inputType) {
		switch (inputType) {
			case PLAIN_TEXT:
				this.inputType = UIAlertViewStyle.PlainTextInput;
				break;

			case PASSWORD:
				this.inputType = UIAlertViewStyle.SecureTextInput;
				break;
		}
		return this;
	}

	@Override
	public GDXTextPrompt dismiss() {
		if (alertView == null) {
			throw new RuntimeException(GDXTextPrompt.class.getSimpleName() + " has not been build. Use build() before dismiss().");
		}
// Path: core/src/de/tomgrill/gdxdialogs/core/GDXDialogsVars.java
// public class GDXDialogsVars {
// 	public static final String VERSION = "1.3.0";
// 	public static final String LOG_TAG = "gdx-dialogs (" + VERSION + ")";
// }
// 
// Path: core/src/de/tomgrill/gdxdialogs/core/dialogs/GDXTextPrompt.java
// public interface GDXTextPrompt {
// 
// 	/**
// 	 * Type of input used by the textfield
// 	 */
// 	enum InputType {
// 		/**
// 		 * prints readable text
// 		 */
// 		PLAIN_TEXT,
// 
// 		/**
// 		 * hides typed text behind specified character
// 		 */
// 		PASSWORD
// 	}
// 
// 	/**
// 	 * Sets the title
// 	 *
// 	 * @param title String value to set the title
// 	 * @return The same instance that the method was called from.
// 	 */
// 	GDXTextPrompt setTitle(CharSequence title);
// 
// 
// 	/**
// 	 * Set the character limit for input. Default is 16.
// 	 *
// 	 * @param maxLength
// 	 * @return
// 	 */
// 	GDXTextPrompt setMaxLength(int maxLength);
// 
// 	/**
// 	 * Shows the dialog. show() can only be called after build() has been called
// 	 * else there might be strange behavior. Runs asynchronously on a different thread.
// 	 *
// 	 * @return The same instance that the method was called from.
// 	 */
// 	GDXTextPrompt show();
// 
// 	/**
// 	 * Dismisses the dialog. You can show the dialog again.
// 	 *
// 	 * @return The same instance that the method was called from.
// 	 */
// 	GDXTextPrompt dismiss();
// 
// 	/**
// 	 * This builds the button and prepares for usage.
// 	 *
// 	 * @return The same instance that the method was called from.
// 	 */
// 	GDXTextPrompt build();
// 
// 	/**
// 	 * Sets the message.
// 	 *
// 	 * @param message The text to be displayed at the body of the dialog. Desktop implementation will ignore this method.
// 	 * @return The same instance that the method was called from.
// 	 */
// 	GDXTextPrompt setMessage(CharSequence message);
// 
// 	/**
// 	 * Sets the default value for the input field.
// 	 *
// 	 * @param inputTip Placeholder for the text input field.
// 	 * @return The same instance that the method was called from.
// 	 */
// 	GDXTextPrompt setValue(CharSequence inputTip);
// 
// 	/**
// 	 * Sets the label for the cancel button on the dialog.
// 	 *
// 	 * @param label Text of the cancel button
// 	 * @return The same instance that the method was called from.
// 	 */
// 	GDXTextPrompt setCancelButtonLabel(CharSequence label);
// 
// 	/**
// 	 * Sets the label for the confirm button on the dialog.
// 	 *
// 	 * @param label Text of the confirm button
// 	 * @return The same instance that the method was called from.
// 	 */
// 	GDXTextPrompt setConfirmButtonLabel(CharSequence label);
// 
// 	/**
// 	 * Sets the {@link TextPromptListener}
// 	 *
// 	 * @param listener listener to be called when the event is triggered
// 	 * @return The same instance that the method was called from.
// 	 */
// 	GDXTextPrompt setTextPromptListener(TextPromptListener listener);
// 
// 	/**
// 	 * Sets the type of input for the text input field.
// 	 *
// 	 * @param inputType type of input
// 	 * @return The same instance that the method was called from.
// 	 */
// 	GDXTextPrompt setInputType(InputType inputType);
// }
// 
// Path: core/src/de/tomgrill/gdxdialogs/core/listener/TextPromptListener.java
// public interface TextPromptListener {
// 
// 	public void cancel();
// 
// 	public void confirm(String text);
// 
// }


// Path: ios-moe/src/de/tomgrill/gdxdialogs/iosmoe/dialogs/IOSMOEGDXTextPrompt.java
import apple.foundation.struct.NSRange;
import apple.uikit.protocol.UITextFieldDelegate;
import com.badlogic.gdx.Gdx;
import org.moe.natj.general.ann.ByValue;
import org.moe.natj.general.ann.NInt;
import de.tomgrill.gdxdialogs.core.GDXDialogsVars;
import de.tomgrill.gdxdialogs.core.dialogs.GDXTextPrompt;
import de.tomgrill.gdxdialogs.core.listener.TextPromptListener;
import apple.uikit.UIAlertView;
import apple.uikit.UITextField;
import apple.uikit.enums.UIAlertViewStyle;
import apple.uikit.protocol.UIAlertViewDelegate;

	public GDXTextPrompt setConfirmButtonLabel(CharSequence label) {
		this.confirmLabel = (String) label;
		return this;
	}

	@Override
	public GDXTextPrompt setTextPromptListener(TextPromptListener listener) {
		this.listener = listener;
		return this;
	}

	@Override
	public GDXTextPrompt setInputType(InputType inputType) {
		switch (inputType) {
			case PLAIN_TEXT:
				this.inputType = UIAlertViewStyle.PlainTextInput;
				break;

			case PASSWORD:
				this.inputType = UIAlertViewStyle.SecureTextInput;
				break;
		}
		return this;
	}

	@Override
	public GDXTextPrompt dismiss() {
		if (alertView == null) {
			throw new RuntimeException(GDXTextPrompt.class.getSimpleName() + " has not been build. Use build() before dismiss().");
		}
		Gdx.app.debug(GDXDialogsVars.LOG_TAG, IOSMOEGDXTextPrompt.class.getSimpleName() + " dismissed.");