<?php

use CodeIgniter\Router\RouteCollection;

/**
 * @var RouteCollection $routes
 */
$routes->get('/', 'Front\Home::index');
//$routes->get('/', 'Auth\Login::index');
$routes->get('about-uga-redd+', 'Front\Home::aboutUsPage');
$routes->get('registration-guidelines', 'Front\Home::guidelinesPage');
$routes->get('online-registration', 'Front\Home::registerPage');
$routes->post('save-registration', 'Front\Register::registerClient');
$routes->get('registration-received=(:any)', 'Front\Register::successRegistration/$1');

$routes->get('display/(:any)', 'Front\Home::displayPosts/$1');
$routes->get('main-posts/(:any)', 'Front\FrontPages::showMainCategoryPostz/$1');
$routes->get('sub-posts/(:any)', 'Front\FrontPages::showSubCategoryPostz/$1');

$routes->get('search', 'Front\Home::searchResults');
$routes->post('search', 'Front\Home::searchResults');
$routes->get('search-page', 'Front\Home::searchResultsPage');
$routes->post('search-page', 'Front\Home::searchResultsPage');
$routes->get('contact-us', 'Front\Home::contactUs'); 

$routes->get('posts', 'Front\Home::index');
$routes->get('posts/(:any)/(:any)', 'Front\FrontPages::singlePost/$1/$2');
$routes->get('posts/(:any)', 'Front\FrontPages::mainCategory/$1');
$routes->get('dams/(:any)', 'Front\FrontPages::damsPageTemplate/$1');
$routes->get('team/(:any)', 'Front\FrontPages::teamPageTemplate/$1');

$routes->get('tags/tag/(:any)', 'Front\FrontPages::tagPosts/$1');
$routes->get('services/(:any)', 'Front\FrontPages::singleServicesPage/$1');

$routes->get('news-blog', 'Front\FrontPages::singleNewsBlogPage');

$routes->get('ucold-membership-benefits', 'Front\FrontPages::memberBenefitsPage');
$routes->get('become-a-member', 'Front\FrontPages::registerMember');

$routes->get('upcoming-events/single=(:any)', 'Front\FrontPages::singleEventsPage/$1');
$routes->get('upcoming-events', 'Front\FrontPages::alleventsPage');

$routes->get('more-directories/(:any)', 'Front\FrontPages::displayDirectories/$1');
$routes->get('directory/(:any)/(:any)/(:any)', 'Front\FrontPages::singleDirectoryPage/$1/$2/$3');
$routes->get('directory/(:any)/(:any)', 'Front\FrontPages::subDirectoryCategoryPage/$1/$2');
$routes->get('directory/(:any)', 'Front\FrontPages::mainDirectoryCategoryPage/$1');
$routes->get('directory', 'Front\FrontPages::directoryPage');
$routes->get('search-directory-page', 'Front\FrontPages::searchDirectoryResultsPage');
$routes->post('search-directory-page', 'Front\FrontPages::searchDirectoryResultsPage');

$routes->get('publications', 'Front\FrontPages::allDownloadsPage');
$routes->get('publications/category=(:any)', 'Front\FrontPages::singleDownloadsCat/$1');
$routes->get('publications/download-file=(:num)', 'Front\FrontPages::downloadPublication/$1');
$routes->post('number-of-downloads', 'Front\FrontPages::saveDownloadsHits');

$routes->get('products/(:any)/(:any)/(:any)', 'Front\Home::singleProductPage/$1/$2/$3');
$routes->get('products/(:any)/(:any)', 'Front\Home::subCategoryPage/$1/$2');
$routes->get('products/(:any)', 'Front\Home::mainCategoryPage/$1');
$routes->get('products', 'Front\Home::allProducts');
$routes->get('seller-page/(:any)-(:any)', 'Front\Home::showSellerProducts/$1');

$routes->get('policy/(:any)', 'Front\Home::policyPage/$1');
$routes->get('page/(:any)', 'Front\FrontPages::singleFrontPage/$1');

$routes->get('cart', 'Front\Cart::index');
$routes->post('cart/register', 'Front\Cart::registerCustomer');

$routes->get('country', 'SelectCountry::index');
$routes->post('state/(:any)', 'SelectCountry::getStates/$1');
$routes->post('city/(:any)', 'SelectCountry::getCities/$1');

$routes->get('district', 'SelectDistrict::index');
$routes->post('county/(:any)', 'SelectDistrict::counties/$1');
$routes->post('subcounty/(:any)', 'SelectDistrict::subcounties/$1');
$routes->post('parish/(:any)', 'SelectDistrict::parishes/$1');
$routes->post('village/(:any)', 'SelectDistrict::villages/$1');

$routes->get('account/login', 'Auth\Login::index');
$routes->post('user/login', 'Auth\Login::login');
$routes->get('verify-otp/(:any)', 'Auth\Login::verifyOTP/$1');
$routes->post('verify-otp/(:any)', 'Auth\Login::verifyOTP/$1');
$routes->get('forgot-password', 'Auth\Login::forgotPassword');
$routes->post('forgot/password', 'Auth\Login::forgotPassword');
$routes->get('reset-password=(:any)', 'Auth\Login::resetPassword/$1');
$routes->post('reset-password=(:any)', 'Auth\Login::resetPassword/$1');
$routes->post('new/password', 'Auth\Login::updatePassword');
$routes->get('login/suspended', 'Auth\Login::loginAttempts');
$routes->get('forgot-password=response-(:any)', 'Auth\Login::forgotPasswordResponse/$1');
$routes->post('check-user-email', 'Auth\Login::checkEmail');

$routes->get('register', 'Auth\Register::index');
$routes->post('create/account', 'Auth\Register::createAccount');
$routes->get('thank-you', 'Auth\Register::thankYou');
$routes->get('register/activate/(:any)', 'Auth\Register::accountActivate/$1');
$routes->get('resend/token', 'Auth\Register::reActivationLink');
$routes->post('resend/token', 'Auth\Register::reActivationLink');

$routes->get('logout', 'Auth\AuthController::logout');
