package cn.forevermc.launcher.bean;

import javafx.beans.property.BooleanProperty;
import javafx.beans.property.DoubleProperty;
import javafx.beans.property.IntegerProperty;
import javafx.beans.property.ObjectProperty;
import javafx.beans.property.StringProperty;
import lombok.Data;
import com.imyeyu.java.bean.Language;

/**
 * 配置
 *
 * @author 夜雨
 * @since 2024-04-18 17:55
 */
@Data
public class Config {

	/** 主配置 */
	private Main main;

	/** 玩家配置 */
	private Player player;

	/** 启动配置 */
	private Launcher launcher;

	/**
	 * 主配置
	 *
	 * @author 夜雨
	 * @since 2024-04-18 18:00
	 */
	@Data
	public static class Main {

		/** 启动器语言 */
		private ObjectProperty<Language> language;

		/** 背景音乐音量，[0, 100] */
		private DoubleProperty bgmVolume;

		/** 音效音量，[0, 100] */
		private DoubleProperty soundVolume;

		/** 游戏下载源 */
		private ObjectProperty<GameDownloadSource> gameDownloadSource;

		/** 运行时下载源 */
		private ObjectProperty<RuntimeDownloadSource> runtimeDownloadSource;
	}

	/**
	 * 玩家配置
	 *
	 * @author 夜雨
	 * @since 2024-04-18 18:00
	 */
	@Data
	public static class Player {

		/** 登录名 */
		private StringProperty name;

		/** 密码 */
		private StringProperty password;
	}

	/**
	 * 启动器配置
	 *
	 * @author 夜雨
	 * @since 2024-04-18 17:59
	 */
	@Data
	public static class Launcher {

		/** 最大内存 */
		private DoubleProperty memory;

		/** 启动游戏 */
		private StringProperty game;

		/** 客户端 ID */
		private StringProperty clientId;

		/** true 为自动启动 */
		private BooleanProperty autoStartup;

		/** 多线程下载游戏 */
		private IntegerProperty multiDownload;
	}
}
