<?php

namespace App;

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


class RouterFactory
{

	/**
	 * @return Nette\Application\IRouter
	 */
	public static function createRouter()
	{
		Route::$defaultFlags = Route::SECURED;;

		$adminRouter = new RouteList('Admin');
//		$adminRouter[] = new Route('admin/[<locale>/][<gameId>/]game-content/<action>[/<id>]', 'GameContent:default');
		$adminRouter[] = new Route('admin/[<locale>/]<presenter>/<action>[/<id>]', 'Homepage:default');

		$frontRouter = new RouteList('Front');
		$frontRouter[] = new Route('[<locale>/]<presenter>/<action>[/<id>]', 'Homepage:default');

		$router = new RouteList();
		$router[] = $adminRouter;
		$router[] = $frontRouter;

		return $router;
	}

}
