<?php

declare(strict_types=1);

namespace App\Router;

use Nette;
use Nette\Application\Routers\RouteList;


final class RouterFactory
{
	use Nette\StaticClass;

	public static function createRouter(): RouteList
	{
		$router = new RouteList;
		$router->addRoute('login-api/login-instructor', 'Login:loginInstructor');
		$router->addRoute('login-api/login-school', 'Login:loginSchool');
		$router->addRoute('login-api/logout', 'Homepage:logout');
		$router->addRoute('login-api/get-logged-user-data', 'Login:getUserData');
		$router->addRoute('login-api/register-instructor', 'Login:registerInstructor');
		$router->addRoute('login-api/register-school', 'Login:registerSchool');

		$router->addRoute('instructor-api/get-all-instructors', 'Instructor:getAllInstructors');
		$router->addRoute('instructor-api/change-instructor-role', 'Instructor:changeRole');
		$router->addRoute('instructor-api/save-instructor-profile', 'Instructor:saveProfile');

		$router->addRoute('course-api/create-course', 'Course:createCourse');
		$router->addRoute('course-api/update-course', 'Course:updateCourse');
		$router->addRoute('course-api/change-course-state', 'Course:changeCourseState');
		$router->addRoute('course-api/update-course-instructors', 'Course:updateCourseInstructors');
		$router->addRoute('course-api/save-interest', 'Course:saveInterest');
		$router->addRoute('course-api/remove-interest', 'Course:removeInterest');
		$router->addRoute('course-api/get-by-id', 'Course:getById');
		//$router->addRoute('course-api/get-basic-by-id', 'Course:getBasicById');
		//$router->addRoute('course-api/get-nearest-free-spots', 'Course:getNearestFreeSpots');
		$router->addRoute('course-api/get-actual-year-courses', 'Course:getActualYearCourses');
		$router->addRoute('course-api/get-my-courses', 'Course:getMyCourses');
		$router->addRoute('course-api/get-instructor-courses', 'Course:getInstructorCourses');
		$router->addRoute('course-api/get-school-courses', 'Course:getSchoolCourses');
		$router->addRoute('course-api/get-requested-courses', 'Course:getRequestedCourses');
		$router->addRoute('course-api/enlist-new-course', 'Course:enlistNewCourse');
		$router->addRoute('course-api/enlist-modified-course', 'Course:enlistModifiedCourse');
		$router->addRoute('course-api/create-questionnaire', 'Course:createQuestionnaire');
		$router->addRoute('course-api/update-questionnaire', 'Course:updateQuestionnaire');
		$router->addRoute('course-api/create-instructor-evaluation', 'Course:createInstructorEvaluation');
		$router->addRoute('course-api/update-instructor-evaluation', 'Course:updateInstructorEvaluation');
		$router->addRoute('course-api/update-course-report', 'Course:updateCourseReport');	

		$router->addRoute('free-scopes-api/get-free-scopes', 'FreeScopes:getFreeScopes');

		$router->addRoute('fund-api/get-my-fund', 'Fund:getMyFund');
		$router->addRoute('fund-api/get-instructor-fund', 'Fund:getInstructorFund');
		$router->addRoute('fund-api/create-fund-record', 'Fund:createFundRecord');
		$router->addRoute('fund-api/update-fund-record', 'Fund:updateFundRecord');
		$router->addRoute('fund-api/remove-fund-record', 'Fund:removeFundRecord');

		$router->addRoute('course-theme-api/get-all-themes', 'CourseTheme:getAllThemes');
		$router->addRoute('course-theme-api/get-by-id', 'CourseTheme:getById');
		$router->addRoute('course-theme-api/create-theme', 'CourseTheme:createTheme');
		$router->addRoute('course-theme-api/update-theme', 'CourseTheme:updateTheme');

		$router->addRoute('school-api/get-all-schools', 'School:getAllSchools');
		$router->addRoute('school-api/get-by-id', 'School:getById');
		// $router->addRoute('school-api/create-school', 'School:createSchool');
		$router->addRoute('school-api/update-school', 'School:updateSchool');

		//$router->addRoute('instructor', 'Instructor:default');
		//$router->addRoute('instructor[/<path .+>]', 'Instructor:default');
		//$router->addRoute('school[/<path .+>]', 'School:default');
		$router->addRoute('<path .+>', 'Homepage:default');
		$router->addRoute('', 'Homepage:default');

		//$router->addRoute('<presenter>/<action>[/<id>]', 'Homepage:default');
		return $router;
	}
}
