<?php

$route->group('user')->namespace('Amwdeveloper\view');
$route->get("/", "user:index");
$route->get("/info", "user:index");

if (previlegy_character['manage_email']['active']) {
    $route->get("/manage/email", "user:manageemail");
}

$route->get("/manage/passwd", "user:managepasswd");
$route->get("/manage/personalid", "user:managepersonalid");
$route->get("/characters", "user:characters");
if (currency['active']) {
    $route->get("/exchange/coins", "user:exchangecoins");
}

$route->get("/logout", "user:logoutaccount");

/** Character redirect */
$route->get("/manage/character/{char}", "user:managecharacter");

if (previlegy_character['manage_nick']['active']) {
    $route->get("/manage/nick/{char}", "user:managenickcharacter");
}

if (previlegy_character['manage_class']['active']) {
    $route->get("/manage/class/{char}", "user:manageclasscharacter");
}

if (previlegy_character['manage_move']['active']) {
    $route->get("/manage/move/{char}", "user:managemovecharacter");
}

if (previlegy_character['manage_avatar']['active']) {
    $route->get("/manage/avatar/{char}", "user:manageavatarcharacter");
}

/** * * * * * * * * * * * * * * * 
 * REQUESTS 
 * * * * * * * * * * * * * * * */
$route->group("auth")->namespace('Amwdeveloper\controller');

if (previlegy_character['manage_email']) {
    $route->post("/manage/email", "authuser:postmanageemail");
}

$route->post("/manage/passwd", "authuser:postmanagepasswd");
$route->post("/manage/personalid", "authuser:postmanagepersonalid");

/** Character */
if (previlegy_character['manage_nick']['active']) {
    $route->post("/manage/nick/{char}", "authuser:postmanagenickcharacter");
}

if (previlegy_character['manage_class']['active']) {
    $route->post("/manage/class/{char}", "authuser:postmanageclasscharacter");
}

if (previlegy_character['manage_move']['active']) {
    $route->post("/manage/move/{char}", "authuser:postmanagemovecharacter");
}

if (previlegy_character['manage_avatar']['active']) {
    $route->post("/manage/avatar/{char}", "authuser:postmanageavatarcharacter");
}

if (previlegy_character['manage_nick']['active']) {
    $route->post("/exchange/coins", "authuser:postexchangecoins");
}
/** Login account */
$route->post("/login/account", "authuser:postloginaccount");
