package TodoListApp.Domain;

public class AddTask {
	
	public static Task addTaskZuList(String title, String beschreibung, String eingabeTaskprioritaet) {
		Task t;
		Prioritaet taskPrioritaet = null;
		switch (eingabeTaskprioritaet) {
		case "niedrig":
			taskPrioritaet = taskPrioritaet.Niedrig;
			break;

		case "mittel":
			taskPrioritaet = taskPrioritaet.Mittel;
			break;

		case "hoch":
			taskPrioritaet = taskPrioritaet.Hoch;
			break;
		default:
			taskPrioritaet = taskPrioritaet.Niedrig;
		}
		
		return t = new Task(title,beschreibung,taskPrioritaet);
		
		
	}

}
