// Path: src/protocolsupportpocketstuff/api/modals/elements/ModalImage.java
// public class ModalImage {
// 
// 	private final transient ModalImageType modalImageType;
// 	private final String type;
// 	private String data;
// 
// 	/***
// 	 * Constructs a new ModalImage with the required parameters.
// 	 * @param imageType - The type of the image.
// 	 * @param data - The data (url / path) of the image.
// 	 */
// 	public ModalImage(ModalImageType imageType, String data) {
// 		this.modalImageType = imageType;
// 		this.type = imageType.getPeName();
// 		this.data = data;
// 	}
// 
// 	/***
// 	 * @return the ImageType of this ModalImage.
// 	 */
// 	public ModalImageType getType() {
// 		return modalImageType;
// 	}
// 
// 	/***
// 	 * @return the internal representation of this ModalImage's type.
// 	 */
// 	public String getPeType() {
// 		return type;
// 	}
// 
// 	/***
// 	 * @return the url / path to the image.
// 	 */
// 	public String getData() {
// 		return data;
// 	}
// 
// 	/***
// 	 * Sets the url / path to the image.
// 	 * @param data
// 	 * @return this
// 	 */
// 	public ModalImage setData(String data) {
// 		this.data = data;
// 		return this;
// 	}
// 
// 	/***
// 	 * Fully clones the modalimage.
// 	 * @return a new modalImage.
// 	 */
// 	public ModalImage clone() {
// 		return new ModalImage(getType(), getData());
// 	}
// 
// 	/***
// 	 * The types a ModalImage can be.
// 	 */
// 	public enum ModalImageType {
// 
// 		/***
// 		 * Client or local image.
// 		 * The client will expect a local path to
// 		 * an image contained in the resourcestack
// 		 * if this type is used.
// 		 */
// 		CLIENT_IMAGE("path"),
// 
// 		/***
// 		 * External or remote image.
// 		 * The client will expect an utl to
// 		 * an image if this type is used.
// 		 */
// 		EXTERNAL_IMAGE("url");
// 
// 		private String peName;
// 
// 		ModalImageType(String peName) {
// 			this.peName = peName;
// 		}
// 
// 		/***
// 		 * @return the internal PE name.
// 		 */
// 		public String getPeName() {
// 			return peName;
// 		}
// 
// 	}
// 
// }
// 
// Path: src/protocolsupportpocketstuff/api/modals/elements/complex/ComplexModalUIElement.java
// public abstract class ComplexModalUIElement extends ModalUIElement {
// 
// 	private final transient ComplexElementType elementType;
// 	private final String type;
// 
// 	/**
// 	 * Constructs a new ComplexModalUIElement with the required parameters.
// 	 * @param type - the type of the element.
// 	 * @param text - the text of the element.
// 	 */
// 	public ComplexModalUIElement(ComplexElementType type, String text) {
// 		super(text);
// 		this.elementType = type;
// 		this.type = type.getPeName();
// 	}
// 
// 	/***
// 	 * @return the ComplexModalUIElement's type.
// 	 */
// 	public ComplexElementType getComplexType() {
// 		return elementType;
// 	}
// 
// 	/***
// 	 * @return the ComplexModalUIElement's types internal name.
// 	 */
// 	public String getPeType() {
// 		return type;
// 	}
// 
// 	/***
// 	 * Fully clones a ComplexModalUIElement
// 	 * @return the cloned element.
// 	 */
// 	public abstract ComplexModalUIElement clone();
// 
// }
// 
// Path: src/protocolsupportpocketstuff/util/GsonUtils.java
// public class GsonUtils {
// 	public static final Gson GSON = new Gson();
// 	public static final JsonParser JSON_PARSER = new JsonParser();
// }


import protocolsupportpocketstuff.api.modals.elements.ModalImage;
import protocolsupportpocketstuff.api.modals.elements.complex.ComplexModalUIElement;
import protocolsupportpocketstuff.util.GsonUtils;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
package protocolsupportpocketstuff.api.modals;



/***
 * Implementation of COMPLEX_FORM.
 * Used to build and send ComplexForm modals.
 * A complex form can have ComplexUIElements
 * (such as sliders, dropdowns, input fields, buttons, etc)
 * but always has at least a title.
 */
public class ComplexForm implements Modal {

	private final transient ModalType modalType = ModalType.COMPLEX_FORM;
	private final String type = modalType.getPeName();

	private String title;
	private List<ComplexModalUIElement> content = new ArrayList<>();
// Path: src/protocolsupportpocketstuff/api/modals/elements/ModalImage.java
// public class ModalImage {
// 
// 	private final transient ModalImageType modalImageType;
// 	private final String type;
// 	private String data;
// 
// 	/***
// 	 * Constructs a new ModalImage with the required parameters.
// 	 * @param imageType - The type of the image.
// 	 * @param data - The data (url / path) of the image.
// 	 */
// 	public ModalImage(ModalImageType imageType, String data) {
// 		this.modalImageType = imageType;
// 		this.type = imageType.getPeName();
// 		this.data = data;
// 	}
// 
// 	/***
// 	 * @return the ImageType of this ModalImage.
// 	 */
// 	public ModalImageType getType() {
// 		return modalImageType;
// 	}
// 
// 	/***
// 	 * @return the internal representation of this ModalImage's type.
// 	 */
// 	public String getPeType() {
// 		return type;
// 	}
// 
// 	/***
// 	 * @return the url / path to the image.
// 	 */
// 	public String getData() {
// 		return data;
// 	}
// 
// 	/***
// 	 * Sets the url / path to the image.
// 	 * @param data
// 	 * @return this
// 	 */
// 	public ModalImage setData(String data) {
// 		this.data = data;
// 		return this;
// 	}
// 
// 	/***
// 	 * Fully clones the modalimage.
// 	 * @return a new modalImage.
// 	 */
// 	public ModalImage clone() {
// 		return new ModalImage(getType(), getData());
// 	}
// 
// 	/***
// 	 * The types a ModalImage can be.
// 	 */
// 	public enum ModalImageType {
// 
// 		/***
// 		 * Client or local image.
// 		 * The client will expect a local path to
// 		 * an image contained in the resourcestack
// 		 * if this type is used.
// 		 */
// 		CLIENT_IMAGE("path"),
// 
// 		/***
// 		 * External or remote image.
// 		 * The client will expect an utl to
// 		 * an image if this type is used.
// 		 */
// 		EXTERNAL_IMAGE("url");
// 
// 		private String peName;
// 
// 		ModalImageType(String peName) {
// 			this.peName = peName;
// 		}
// 
// 		/***
// 		 * @return the internal PE name.
// 		 */
// 		public String getPeName() {
// 			return peName;
// 		}
// 
// 	}
// 
// }
// 
// Path: src/protocolsupportpocketstuff/api/modals/elements/complex/ComplexModalUIElement.java
// public abstract class ComplexModalUIElement extends ModalUIElement {
// 
// 	private final transient ComplexElementType elementType;
// 	private final String type;
// 
// 	/**
// 	 * Constructs a new ComplexModalUIElement with the required parameters.
// 	 * @param type - the type of the element.
// 	 * @param text - the text of the element.
// 	 */
// 	public ComplexModalUIElement(ComplexElementType type, String text) {
// 		super(text);
// 		this.elementType = type;
// 		this.type = type.getPeName();
// 	}
// 
// 	/***
// 	 * @return the ComplexModalUIElement's type.
// 	 */
// 	public ComplexElementType getComplexType() {
// 		return elementType;
// 	}
// 
// 	/***
// 	 * @return the ComplexModalUIElement's types internal name.
// 	 */
// 	public String getPeType() {
// 		return type;
// 	}
// 
// 	/***
// 	 * Fully clones a ComplexModalUIElement
// 	 * @return the cloned element.
// 	 */
// 	public abstract ComplexModalUIElement clone();
// 
// }
// 
// Path: src/protocolsupportpocketstuff/util/GsonUtils.java
// public class GsonUtils {
// 	public static final Gson GSON = new Gson();
// 	public static final JsonParser JSON_PARSER = new JsonParser();
// }


// Path: src/protocolsupportpocketstuff/api/modals/ComplexForm.java
import protocolsupportpocketstuff.api.modals.elements.ModalImage;
import protocolsupportpocketstuff.api.modals.elements.complex.ComplexModalUIElement;
import protocolsupportpocketstuff.util.GsonUtils;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

package protocolsupportpocketstuff.api.modals;



/***
 * Implementation of COMPLEX_FORM.
 * Used to build and send ComplexForm modals.
 * A complex form can have ComplexUIElements
 * (such as sliders, dropdowns, input fields, buttons, etc)
 * but always has at least a title.
 */
public class ComplexForm implements Modal {

	private final transient ModalType modalType = ModalType.COMPLEX_FORM;
	private final String type = modalType.getPeName();

	private String title;
	private List<ComplexModalUIElement> content = new ArrayList<>();
	private ModalImage iconUrl; // Only for server settings ~ https://sel-utils.github.io/protocol/pocket134/play/server-settings-response