<?php
$r->addGroup("/konto", function (FastRoute\RouteCollector $r) {
	//konto
	$r->addRoute(["GET"], "", ["account", "index", "presenter"]);
	//konto/dane
	$r->addRoute(["POST"], "/dane", ["account", "data", "presenter"]);
	//konto/haslo
	$r->addRoute(["POST"], "/haslo", ["account", "password", "presenter"]);
});

$r->addGroup("/prezentacje", function (FastRoute\RouteCollector $r) {
	//prezentacje/dodaj
	$r->addRoute(["POST"], "/dodaj", ["presentation", "create", "presenter"]);
	//prezentacje/kopiuj/{id}
	$r->addRoute(["POST"], "/kopiuj/{id}", ["presentation", "copy", "presenter"]);
	//prezentacje/edytuj/{id}
	$r->addRoute(["GET"], "/edytuj/{id}", ["presentation", "edit", "presenter"]);
	//prezentacje/zapisz/{id}
	$r->addRoute(["POST"], "/zapisz/{id}", ["presentation", "save", "presenter"]);
	//prezentacje/podglad/{id}
	//$r->addRoute(["GET"], "/podglad/{id}", ["presentation", "preview", "presenter"]);
	//prezentacje/usun/{id}
	$r->addRoute(["POST"], "/usun/{id}", ["presentation", "remove", "presenter"]);
	//prezentacje/porzadek/{pid}
	$r->addRoute(["POST"], "/porzadek/{id}", ["presentation", "sort", "presenter"]);
	//prezentacje/uruchom/{id}
	$r->addRoute(["GET"], "/uruchom/{id}", ["presentation", "play", "presenter"]);
	//prezentacje/wylacz/{id}
	$r->addRoute(["GET"], "/wylacz/{id}", ["presentation", "off", "presenter"]);
	//prezentacje/usun-wyniki/{id}
	$r->addRoute(["POST"], "/usun-wyniki/{id}", ["presentation", "removeResults", "presenter"]);
});

$r->addGroup("/slajdy", function (FastRoute\RouteCollector $r) {
	//slajdy/dodaj/{pid}
	$r->addRoute(["POST"], "/dodaj/{pid}", ["slide", "create", "presenter"]);
	//slajdy/typ/{pid}/{id}
	$r->addRoute(["POST"], "/typ/{pid}/{id}", ["slide", "type", "presenter"]);
	//slajdy/zapisz/{pid}/{id}
	$r->addRoute(["POST"], "/zapisz/{pid}/{id}", ["slide", "save", "presenter"]);
	//slajdy/pokaz/{pid}/{id}
	$r->addRoute(["POST"], "/pokaz/{pid}/{id}", ["slide", "show", "presenter"]);
	//slajdy/podglad/{pid}/{id}
	$r->addRoute(["POST"], "/podglad/{pid}/{id}", ["slide", "preview", "presenter"]);
	//slajdy/obrazek/{pid}/{id}
	$r->addRoute(["POST"], "/obrazek/{pid}/{id}", ["slide", "saveImage", "presenter"]);
	//slajdy/usun/{pid}/{id}
	$r->addRoute(["POST"], "/usun/{pid}/{id}", ["slide", "remove", "presenter"]);
	//slajdy/kopiuj/{pid}/{id}
	$r->addRoute(["POST"], "/kopiuj/{pid}/{id}", ["slide", "copy", "presenter"]);
	//slajdy/usun-wyniki/{pid}/{id}
	$r->addRoute(["POST"], "/usun-wyniki/{pid}/{id}", ["slide", "removeResults", "presenter"]);
	//slajdy/uruchom/{pid}/{id}
	$r->addRoute(["GET"], "/uruchom/{pid}/{id}", ["slide", "play", "presenter"]);
	//slajdy/quiz-wyniki/{pid}/{id}
	$r->addRoute(["GET"], "/quiz-wyniki/{pid}/{id}", ["slide", "resultsQuiz", "presenter"]);
});
?>