<?php

use CodeIgniter\Router\RouteCollection;

/**
 * @var RouteCollection $routes
 */
$routes->post('/callback/cards',                'DigiCallBack::cardAccount');
$routes->get('/flow/v1/new-account',            'AirFlow::flowNewAccount');
$routes->get('/flow/v1/applicationreminder',            'AirFlow::flowAppReminder');
$routes->get('/flow/v1/dailyreports',            'AirFlow::flowDailyReports');
$routes->get('/flow/v1/generalalerts',            'AirFlow::flowGeneralAlerts');
$routes->get('/flow/v1/newemployers',            'AirFlow::flowNewEmployers');
$routes->get('/flow/v1/paymentreminder',            'AirFlow::flowPaymentReminder');
$routes->get('/flow/v1/verifyempoyer',            'AirFlow::flowVerifyEmpoyer');

$routes->get('/', 'Home::index');


$routes->post('/digibko/v1/identity/token',   'DigiFiAuth::startBkoToken');

$routes->get('/digibko/v1/identity/verify_token',    'DigiFiAuth::verifyGetBkoToken');
$routes->post('/digibko/v1/identity/verify_token',   'DigiFiAuth::verifyPostBkoToken');

$routes->get('/digibko/v1/dash',              'BkoDash::bkoDashHome');

$routes->get('/digibko/v1/loan/started',       'BkoReports::startedApplication');
$routes->get('/digibko/v1/loan/pending',       'BkoReports::pendingApplication');
$routes->get('/digibko/v1/loan/ready',         'BkoReports::readyApplication');
$routes->get('/digibko/v1/loan/verified',      'BkoReports::writingApplication');
$routes->get('/digibko/v1/loan/approved',      'BkoReports::approvedApplication');
$routes->get('/digibko/v1/loan/rejected',      'BkoReports::rejectedApplication');

$routes->get('/digibko/v1/loan/process/(:any)',      'Loan::loanProcess/$1');
//$routes->get('/en/wrench/api/v1/blogdata/(:any)', 'WrenchBlog::blogLimitedData/$1');

$routes->get('/digibko/v1/employers',          'BkoReports::employersList');

$routes->get('/digibko/v1/employers/signatory',              'BkoReports::signatoryList');
$routes->post('/digibko/v1/employers/signatory',              'BkoReports::signatoryAdd');
$routes->patch('/digibko/v1/employers/signatory',              'BkoReports::signatoryUpdate');

$routes->post('/digibko/v1/employers/verify',              'Employers::verifyEmployer');

$routes->get('/digibko/v1/users',                  'BkoReports::listUsers');
$routes->get('/digibko/v1/customers',              'BkoReports::listCustomers');
$routes->get('/digibko/v1/customers/(:any)',       'BkoReports::getCustomer/$1');

$routes->post('/digibko/v1/employer',              'BkoReports::employerAdd');

/*
 * Processing the loan from back office
 */
$routes->post('/digibko/v1/loan/start-processing',      'Loan::startProcessing');

$routes->get('/digibko/v1/dashboard/bvn/recent',   'DigiFiAuth::startBkoToken');
//$routes->get('/digibko/v1/applications/pending',   'BkoReports::pendingApplication');

$routes->post('/digiusers/v1/bvn',                  'DigiFiBVN::startBVNVerify');
$routes->post('/digiusers/v1/bvn/verify',           'DigiFiBVN::completeBVNVerify');

$routes->get('/digiusers/v1/dash',                  'Users::userDash');
$routes->get('/digiusers/v1/agreements',            'Users::userAgreement');

$routes->get('/digiusers/v1/dash/profile',           'Users::userDashProfile');
$routes->get('/digiusers/v1/dash/employer',         'Users::userDashEmployer');
$routes->get('/digiusers/v1/dash/references',       'Users::userDashReferences');

$routes->get('/digiusers/v1/profile',              'Users::userProfile');

$routes->post('/digiusers/v1/addcard',             'Users::userAddCard');
$routes->get('/digiusers/v1/payment/status',       'Users::userPaymentStatus');

$routes->get('/digiusers/v1/employers',              'Employers::approvedEmployersList');

$routes->post('/digiusers/v1/loan/apply',           'Loan::loanApply');
$routes->get('/digiusers/v1/loan/loanlist',         'Loan::loanlist');
$routes->get('/digiusers/v1/loan/loandetail',       'Loan::loanDetail');

$routes->get('/digiusers/v1/loan/paymentcard/add',  'Loan::addPaymentCard');


$routes->post('/employment/v1/auth',                 'Employment::login');
$routes->post('/employment/v1/otp',                  'Employment::verifyOTP');
$routes->post('/employment/v1/verify',               'Employment::verifyEmployment');

$routes->get('/employment/v1/application',           'Employment::loadApplication');

