package studio.junk.jam.coloritum.ui.components;

import com.badlogic.ashley.core.Component;
import com.badlogic.ashley.core.ComponentMapper;
import com.badlogic.gdx.graphics.Texture;
import com.badlogic.gdx.utils.Array;

public class MenuEntries implements Component {
	public static final ComponentMapper<MenuEntries> mapper = ComponentMapper.getFor(MenuEntries.class);

	public static class Entry {
		public String	title;
		public String	description;
		public Texture	icon;
		public String	action;
		public Object	actionData;

		public Entry(String title, String description, String action, Object actionData, Texture icon) {
			this.title = title;
			this.description = description;
			this.action = action;
			this.icon = icon;
			this.actionData = actionData;
		}

		public Entry(String title, String action, Object actionData, Texture icon) {
			this(title, "", action, actionData, icon);
		}
	}

	public final Array<Entry> entries;

	public MenuEntries() {
		entries = new Array<Entry>();
	}

	public MenuEntries(Entry entry) {
		this();
		entries.add(entry);
	}

	public MenuEntries(Entry[] entries) {
		this();
		this.entries.addAll(entries);
	}

}
