// Path: src/main/java/net/seleucus/wsp/console/WSConsole.java
// public abstract class WSConsole {
// 
// 	public static final WSConsole getWsConsole() {
// 		if (System.console() != null) {
// 			return new WSConsoleNative();
// 		} else {
// 			return new WSConsoleInOut();
// 		}
// 	}
// 
// 	public abstract String readLine(String string);
// 
// 	public abstract char[] readPassword(String string);
// 
// 	public abstract void println(String string);
// 
// }


import net.seleucus.wsp.console.WSConsole;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.nio.CharBuffer;
import java.sql.SQLException;
import java.util.Arrays;
package net.seleucus.wsp.main;



public abstract class WSGestalt {

	private final static Logger LOGGER = LoggerFactory.getLogger(WSGestalt.class);    

	private static final String ANSI_RED = "\u001B[31m";
	private static final String ANSI_BLUE = "\u001B[34m";
	private static final String ANSI_PURPLE = "\u001B[35m";
	private static final String ANSI_RESET = "\u001B[0m";

	protected final WSConsole myConsole;

	public WSGestalt(WebSpa myWebSpa) {
		this.myConsole = myWebSpa.getConsole();
	}
	
	public String readLineOptional(final String displayString) {
		final StringBuilder displayBuilder = new StringBuilder();
		
		displayBuilder.append("[Input Option] ");
		displayBuilder.append(displayString);
		displayBuilder.append(':');
		displayBuilder.append(' ');
		
		return myConsole.readLine(ANSI_BLUE + " USER [xx.xxx] " + displayBuilder.toString() + ANSI_RESET);
	}
	
	public int readLineOptionalInt(final String displayString) {
		final String inputString = readLineOptional(displayString);
		int output = -1;
		
		try {
			output = Integer.parseInt(inputString);
			
		} catch(NumberFormatException ex) {
// Path: src/main/java/net/seleucus/wsp/console/WSConsole.java
// public abstract class WSConsole {
// 
// 	public static final WSConsole getWsConsole() {
// 		if (System.console() != null) {
// 			return new WSConsoleNative();
// 		} else {
// 			return new WSConsoleInOut();
// 		}
// 	}
// 
// 	public abstract String readLine(String string);
// 
// 	public abstract char[] readPassword(String string);
// 
// 	public abstract void println(String string);
// 
// }


// Path: src/main/java/net/seleucus/wsp/main/WSGestalt.java
import net.seleucus.wsp.console.WSConsole;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.nio.CharBuffer;
import java.sql.SQLException;
import java.util.Arrays;

package net.seleucus.wsp.main;



public abstract class WSGestalt {

	private final static Logger LOGGER = LoggerFactory.getLogger(WSGestalt.class);    

	private static final String ANSI_RED = "\u001B[31m";
	private static final String ANSI_BLUE = "\u001B[34m";
	private static final String ANSI_PURPLE = "\u001B[35m";
	private static final String ANSI_RESET = "\u001B[0m";

	protected final WSConsole myConsole;

	public WSGestalt(WebSpa myWebSpa) {
		this.myConsole = myWebSpa.getConsole();
	}
	
	public String readLineOptional(final String displayString) {
		final StringBuilder displayBuilder = new StringBuilder();
		
		displayBuilder.append("[Input Option] ");
		displayBuilder.append(displayString);
		displayBuilder.append(':');
		displayBuilder.append(' ');
		
		return myConsole.readLine(ANSI_BLUE + " USER [xx.xxx] " + displayBuilder.toString() + ANSI_RESET);
	}
	
	public int readLineOptionalInt(final String displayString) {
		final String inputString = readLineOptional(displayString);
		int output = -1;
		
		try {
			output = Integer.parseInt(inputString);
			
		} catch(NumberFormatException ex) {
			LOGGER.error("Invalid Number");