// Path: src/protocolsupportpocketstuff/api/modals/ModalType.java
// public enum ModalType {
// 
// 	/***
// 	 * Simple modal. Always has true / false buttons.<br/>
// 	 * Implementation: {@link ModalWindow}
// 	 */
// 	MODAL_WINDOW("modal"),
// 
// 	/***
// 	 * Simple form. Multiple buttons with possible images.<br/>
// 	 * Implementation: {@link SimpleForm}
// 	 */
// 	SIMPLE_FORM("form"),
// 
// 	/***
// 	 * Complex form. All kinds of cool and custom stuff.<br/>
// 	 * Implementation: {@link ComplexForm}
// 	 */
// 	COMPLEX_FORM("custom_form"),
// 
// 	/***
// 	 * Returned when no formtype could be identified.
// 	 * Might also be returned on event / callback.
// 	 */
// 	UNKNOWN("unknown");
// 
// 	private final String peName;
// 
// 	ModalType(String peName) {
// 		this.peName = peName;
// 	}
// 
// 	/***
// 	 * @return the PE name of the modal type.
// 	 */
// 	public String getPeName() {
// 		return peName;
// 	}
// 
// 	/***
// 	 * Gets a ModalType from its PE name.
// 	 * @param peName
// 	 * @return
// 	 */
// 	public static ModalType getByPeName(String peName) {
// 		for (ModalType type : ModalType.values()) {
// 			if (type.getPeName().equals(peName)) {
// 				return type;
// 			}
// 		}
// 		return UNKNOWN;
// 	}
// 
// 	/***
// 	 * Gets the ModalType from a json modal. 
// 	 * @param modalJSON
// 	 * @return the modalType.
// 	 */
// 	public static ModalType fromModal(String modalJSON) {
// 		JsonObject jsonParser = GsonUtils.JSON_PARSER.parse(modalJSON).getAsJsonObject();
// 		String pocketType = jsonParser.get("type").getAsString();
// 		return ModalType.getByPeName(pocketType);
// 	}
// 
// 	/***
// 	 * Gets the ModalType from a modal. 
// 	 * @param modal
// 	 * @return the modalType.
// 	 */
// 	public static ModalType fromModal(Modal modal) {
// 		return modal.getType();
// 	}
// 
// }
// 
// Path: src/protocolsupportpocketstuff/api/modals/elements/ElementResponse.java
// public class ElementResponse {
// 
// 	private JsonElement value;
// 
// 	/***
// 	 * Creates a new response object using the original json value from the array.
// 	 * @param value
// 	 */
// 	public ElementResponse(JsonElement value) {
// 		this.value = value;
// 	}
// 
// 	/***
// 	 * Checks whether the value of the response is null.
// 	 * This can also be on labels, which are still in the response array.
// 	 * @return
// 	 */
// 	public boolean isNull() {
// 		return value == null || value.isJsonNull();
// 	}
// 
// 	/***
// 	 * Gets the String contained in the response.
// 	 * This can (only) be done when the element was a:
// 	 * {@link ModalInput}.
// 	 * @return the String.s
// 	 */
// 	public String getString() {
// 		return value.getAsString();
// 	}
// 
// 	/***
// 	 * Gets the int contained in the response.
// 	 * This can (only) be done when the element was a:
// 	 * {@link ModalDropdown} or a {@link ModalStepSlider}.
// 	 * @return the int.
// 	 */
// 	public int getInt() {
// 		return value.getAsInt();
// 	}
// 
// 	/***
// 	 * Gets the float contained in the response.
// 	 * This can (only) be done when the element was a:
// 	 * {@link ModalSlider}.
// 	 * @return the float.
// 	 */
// 	public float getFloat() {
// 		return value.getAsFloat();
// 	}
// 
// 	/***
// 	 * Gets the boolean contained in the response.
// 	 * This can (only) be done when the element was a:
// 	 * {@link ModalToggle}.
// 	 * @return the float.
// 	 */
// 	public boolean getBoolean() {
// 		return value.getAsBoolean();
// 	}
// 
// }


import java.util.List;
import protocolsupport.api.Connection;
import protocolsupportpocketstuff.api.modals.ModalType;
import protocolsupportpocketstuff.api.modals.elements.ElementResponse;
package protocolsupportpocketstuff.api.modals.events;



/***
 * This event is called when a player completes a {@link ComplexModal}
 * We still need to add response api for this, but for now you can hack something with the jsonarray :D
 */
public class ComplexFormResponseEvent extends ModalResponseEvent {

	private List<ElementResponse> responses;

	/***
	 * Creates a ComplexFormResponseEvent
	 * @param connection
	 * @param modalId
	 * @param modalJSON
	 * @param modalType
	 * @param jsonArray
	 */
	public ComplexFormResponseEvent(Connection connection, int modalId, String modalJSON, ModalType modalType, List<ElementResponse> responses) {
		super(connection, modalId, modalJSON, modalType);
		this.responses = responses;
	}

	/***
	 * Gets the responses as a list.
	 * @return
	 */
// Path: src/protocolsupportpocketstuff/api/modals/ModalType.java
// public enum ModalType {
// 
// 	/***
// 	 * Simple modal. Always has true / false buttons.<br/>
// 	 * Implementation: {@link ModalWindow}
// 	 */
// 	MODAL_WINDOW("modal"),
// 
// 	/***
// 	 * Simple form. Multiple buttons with possible images.<br/>
// 	 * Implementation: {@link SimpleForm}
// 	 */
// 	SIMPLE_FORM("form"),
// 
// 	/***
// 	 * Complex form. All kinds of cool and custom stuff.<br/>
// 	 * Implementation: {@link ComplexForm}
// 	 */
// 	COMPLEX_FORM("custom_form"),
// 
// 	/***
// 	 * Returned when no formtype could be identified.
// 	 * Might also be returned on event / callback.
// 	 */
// 	UNKNOWN("unknown");
// 
// 	private final String peName;
// 
// 	ModalType(String peName) {
// 		this.peName = peName;
// 	}
// 
// 	/***
// 	 * @return the PE name of the modal type.
// 	 */
// 	public String getPeName() {
// 		return peName;
// 	}
// 
// 	/***
// 	 * Gets a ModalType from its PE name.
// 	 * @param peName
// 	 * @return
// 	 */
// 	public static ModalType getByPeName(String peName) {
// 		for (ModalType type : ModalType.values()) {
// 			if (type.getPeName().equals(peName)) {
// 				return type;
// 			}
// 		}
// 		return UNKNOWN;
// 	}
// 
// 	/***
// 	 * Gets the ModalType from a json modal. 
// 	 * @param modalJSON
// 	 * @return the modalType.
// 	 */
// 	public static ModalType fromModal(String modalJSON) {
// 		JsonObject jsonParser = GsonUtils.JSON_PARSER.parse(modalJSON).getAsJsonObject();
// 		String pocketType = jsonParser.get("type").getAsString();
// 		return ModalType.getByPeName(pocketType);
// 	}
// 
// 	/***
// 	 * Gets the ModalType from a modal. 
// 	 * @param modal
// 	 * @return the modalType.
// 	 */
// 	public static ModalType fromModal(Modal modal) {
// 		return modal.getType();
// 	}
// 
// }
// 
// Path: src/protocolsupportpocketstuff/api/modals/elements/ElementResponse.java
// public class ElementResponse {
// 
// 	private JsonElement value;
// 
// 	/***
// 	 * Creates a new response object using the original json value from the array.
// 	 * @param value
// 	 */
// 	public ElementResponse(JsonElement value) {
// 		this.value = value;
// 	}
// 
// 	/***
// 	 * Checks whether the value of the response is null.
// 	 * This can also be on labels, which are still in the response array.
// 	 * @return
// 	 */
// 	public boolean isNull() {
// 		return value == null || value.isJsonNull();
// 	}
// 
// 	/***
// 	 * Gets the String contained in the response.
// 	 * This can (only) be done when the element was a:
// 	 * {@link ModalInput}.
// 	 * @return the String.s
// 	 */
// 	public String getString() {
// 		return value.getAsString();
// 	}
// 
// 	/***
// 	 * Gets the int contained in the response.
// 	 * This can (only) be done when the element was a:
// 	 * {@link ModalDropdown} or a {@link ModalStepSlider}.
// 	 * @return the int.
// 	 */
// 	public int getInt() {
// 		return value.getAsInt();
// 	}
// 
// 	/***
// 	 * Gets the float contained in the response.
// 	 * This can (only) be done when the element was a:
// 	 * {@link ModalSlider}.
// 	 * @return the float.
// 	 */
// 	public float getFloat() {
// 		return value.getAsFloat();
// 	}
// 
// 	/***
// 	 * Gets the boolean contained in the response.
// 	 * This can (only) be done when the element was a:
// 	 * {@link ModalToggle}.
// 	 * @return the float.
// 	 */
// 	public boolean getBoolean() {
// 		return value.getAsBoolean();
// 	}
// 
// }


// Path: src/protocolsupportpocketstuff/api/modals/events/ComplexFormResponseEvent.java
import java.util.List;
import protocolsupport.api.Connection;
import protocolsupportpocketstuff.api.modals.ModalType;
import protocolsupportpocketstuff.api.modals.elements.ElementResponse;

package protocolsupportpocketstuff.api.modals.events;



/***
 * This event is called when a player completes a {@link ComplexModal}
 * We still need to add response api for this, but for now you can hack something with the jsonarray :D
 */
public class ComplexFormResponseEvent extends ModalResponseEvent {

	private List<ElementResponse> responses;

	/***
	 * Creates a ComplexFormResponseEvent
	 * @param connection
	 * @param modalId
	 * @param modalJSON
	 * @param modalType
	 * @param jsonArray
	 */
	public ComplexFormResponseEvent(Connection connection, int modalId, String modalJSON, ModalType modalType, List<ElementResponse> responses) {
		super(connection, modalId, modalJSON, modalType);
		this.responses = responses;
	}

	/***
	 * Gets the responses as a list.
	 * @return
	 */
	public List<ElementResponse> getResponses() {