<?php
defined('BASEPATH') OR exit('No direct script access allowed');

/*
| -------------------------------------------------------------------------
| URI ROUTING
| -------------------------------------------------------------------------
*/

// Default controller - Website landing page
$route['default_controller'] = 'website/index';
$route['404_override'] = '';
$route['translate_uri_dashes'] = TRUE;

// Website routes (landing pages)
$route['home'] = 'website/index';
$route['about'] = 'website/about';
$route['contact'] = 'website/contact';
$route['services'] = 'website/services';
$route['faq'] = 'website/faq';
$route['security'] = 'website/security';
$route['privacy'] = 'website/privacy';
$route['terms'] = 'website/terms';
$route['our-accounts'] = 'website/accounts';
$route['our-cards'] = 'website/cards';
$route['website/send_contact'] = 'website/send_contact';

// Auth routes
$route['login'] = 'auth/login';
$route['register'] = 'auth/register';
$route['logout'] = 'auth/logout';
$route['forgot-password'] = 'auth/forgot_password';
$route['reset-password/(:any)'] = 'auth/reset_password/$1';

// Dashboard
$route['dashboard'] = 'dashboard/index';
$route['dashboard/deposit'] = 'dashboard/deposit';
$route['profile'] = 'dashboard/profile';
$route['settings'] = 'dashboard/settings';
$route['notifications'] = 'dashboard/notifications';
$route['notification/(:num)'] = 'dashboard/notification/$1';

// Accounts
$route['accounts'] = 'accounts/index';
$route['accounts/view/(:num)'] = 'accounts/view/$1';
$route['accounts/statement/(:num)'] = 'accounts/statement/$1';

// Transactions
$route['transactions'] = 'transactions/index';
$route['transactions/view/(:num)'] = 'transactions/view/$1';
$route['transactions/receipt/(:num)'] = 'transactions/receipt/$1';

// Transfers
$route['transfers'] = 'transfers/index';
$route['transfers/internal'] = 'transfers/internal';
$route['transfers/external'] = 'transfers/external';
$route['transfers/international'] = 'transfers/international';
$route['transfers/beneficiaries'] = 'transfers/beneficiaries';
$route['transfers/lookup'] = 'transfers/lookup_account';

// Bills
$route['bills'] = 'bills/index';
$route['bills/airtime'] = 'bills/airtime';
$route['bills/data'] = 'bills/data';
$route['bills/electricity'] = 'bills/electricity';
$route['bills/tv'] = 'bills/tv';
$route['bills/history'] = 'bills/history';
$route['bills/(:any)'] = 'bills/category/$1';

// Cards
$route['cards'] = 'cards/index';
$route['cards/create'] = 'cards/create';
$route['cards/view/(:num)'] = 'cards/view/$1';
$route['cards/fund/(:num)'] = 'cards/fund/$1';
$route['cards/withdraw/(:num)'] = 'cards/withdraw/$1';
$route['cards/transactions/(:num)'] = 'cards/transactions/$1';

// Admin routes
$route['admin'] = 'admin/dashboard';
$route['admin/dashboard'] = 'admin/dashboard';
$route['admin/users'] = 'admin/users';
$route['admin/user/(:num)'] = 'admin/user/$1';
$route['admin/create-user'] = 'admin/create_user';
$route['admin/accounts'] = 'admin/accounts';
$route['admin/create-account/(:num)'] = 'admin/create_account/$1';
$route['admin/transactions'] = 'admin/transactions';
$route['admin/transaction/(:num)'] = 'admin/transaction/$1';
$route['admin/cards'] = 'admin/cards';
$route['admin/crypto-wallets'] = 'admin/crypto_wallets';
$route['admin/crypto-wallet/add'] = 'admin/crypto_wallet_add';
$route['admin/crypto-wallet/edit/(:num)'] = 'admin/crypto_wallet_edit/$1';
$route['admin/crypto-wallet/delete/(:num)'] = 'admin/crypto_wallet_delete/$1';
$route['admin/crypto-addresses/(:num)'] = 'admin/crypto_addresses/$1';
$route['admin/crypto-address/add/(:num)'] = 'admin/crypto_address_add/$1';
$route['admin/crypto-address/delete/(:num)'] = 'admin/crypto_address_delete/$1';
$route['admin/settings'] = 'admin/settings';

// API endpoints (AJAX)
$route['api/account/balance/(:num)?'] = 'accounts/balance/$1';
$route['api/transfer/lookup'] = 'transfers/lookup_account';

// OTP routes
$route['otp/send'] = 'otp/send';
$route['otp/verify'] = 'otp/verify';
$route['otp/status'] = 'otp/status';