package de.siphalor.was;

import de.siphalor.was.content.lang.I18n;
import de.siphalor.was.util.Util;
import de.siphalor.was.visual.ConsoleVisual;
import de.siphalor.was.visual.JFXVisual;

import java.util.logging.Level;

/**
 * The main entry point class
 */
public class Start {
	/**
	 * The main program entry point
	 * @param args The args given from the console
	 */
	public static void main(String[] args) {
		WhatAStorage was = WhatAStorage.getInstance();
		was.reload();

		if (args.length > 0) {
			switch (args[0]) {
				case "jfx" -> was.setVisual(new JFXVisual());
				case "console" -> was.setVisual(new ConsoleVisual());
			}
		} else {
			was.setVisual(new JFXVisual());
		}

		was.setup();

		Util.LOGGER.log(Level.INFO, I18n.getInstance().getString("test.hello-world"));

		was.run();
	}
}
