<?php

use App\Http\Controllers\AdminController;
use App\Http\Controllers\CoinremitterController;
use App\Http\Controllers\DailyLevelCommissionController;
use App\Http\Controllers\HomeController;
use App\Http\Controllers\MailControlller;
use App\Http\Controllers\ReferredBalanceController;
use App\Http\Controllers\UserDashboardController;
use App\Http\Controllers\UserInvestMoney;
use App\Http\Controllers\UserProfittedController;
use App\Http\Controllers\UserRegistraionloginController;
use App\Http\Controllers\WithdrawController;
use Illuminate\Support\Facades\Route;

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider and all of them will
| be assigned to the "web" middleware group. Make something great!
|
*/

// Route::get('/', function () {
//     return view('welcome');
// });

Route::get('/',[UserRegistraionloginController::class,'user_register_page'])->name('user.register.page');
Route::post('/user/register',[UserRegistraionloginController::class,'user_register'])->name('user.register');


Route::get('/user/login/page',[UserRegistraionloginController::class,'user_login_page'])->name('user.login.page');
Route::post('/user/login',[UserRegistraionloginController::class,'user_login'])->name('user.login');

Route::get('/forget/pass/user',[UserRegistraionloginController::class,'forget_pass_user'])->name('forget.pass_user');
Route::post('/user/pass/reset/email',[UserRegistraionloginController::class,'user_pass_reset_email'])->name('user.pass_reset_email');

Route::get('/user/give/code/reset/{id}',[UserRegistraionloginController::class,'user_give_code_reset'])->name('user.give_code_reset');
// Route::post('/user/code/confirms/{$id}',[UserRegistraionloginController::class,'user_code_confirm'])->name('user_code_confirm');
Route::post('/user/code_confirm/{id}',[UserRegistraionloginController::class,'user_code_confirm'])->name('user.code_confirm');


Route::get('/pass/up_page/{id}',[UserRegistraionloginController::class,'pass_up_page'])->name('pass.up_page');

Route::get('/user/pass_res/{id}',[UserRegistraionloginController::class,'user_pass_res'])->name('user.pass_res');
Route::post('/user/pass/reset/confirmation/{id}',[UserRegistraionloginController::class,'user_pass_reset_confirmation'])->name('user.pass_reset_confirmation');

Route::get('/user/dashboard',[UserDashboardController::class,'user_dashboard'])->name('user.dashboard')->middleware('user_middleware');
Route::get('/Logout',[HomeController::class,'logout'])->name('logout');


//user Invest Money Page
Route::get('/user/invest/money/page',[UserInvestMoney::class,'user_invest_money_page'])->name('user.invest_money_page')->middleware('user_middleware');
Route::get('/user/invest/money/page_1/',[UserInvestMoney::class,'user_invest_money_page_1'])->name('user.invest_money_page_1')->middleware('user_middleware');

Route::post('/invest/insert',[UserInvestMoney::class,'invest_insert'])->name('invest.insert')->middleware('user_middleware');
Route::post('/invest/money_to_admin',[UserInvestMoney::class,'invest_money_to_admin'])->name('invest.money_to_admin')->middleware('user_middleware');
Route::get('/user/daily_porfit',[UserInvestMoney::class,'user_daily_porfit'])->name('user.daily_porfit')->middleware('user_middleware');
Route::get('/user/daily/porfit/pertially/{id}',[UserInvestMoney::class,'user_daily_porfit_pertially'])->name('user.daily_porfit_pertially')->middleware('user_middleware');

Route::get('/user/referred/balnce',[ReferredBalanceController::class,'user_referred_balnce'])->name('user.referred_balnce')->middleware('user_middleware');

Route::get('/user/request/for/withdrawl/{id}',[WithdrawController::class,'user_request_for_withdrawl'])->name('user.request_for_withdrawl')->middleware('user_middleware');


//daily Level Commission
Route::get('/user/daily_level',[DailyLevelCommissionController::class,'user_daily_level'])->name('user.daily_level')->middleware('user_middleware');
Route::get('/user/secend_level',[DailyLevelCommissionController::class,'user_secend_level'])->name('user.secend_level')->middleware('user_middleware');

Route::get('/user/profit',[UserProfittedController::class,'user_profit'])->name('user.profit')->middleware('user_middleware');
Route::post('/request/daily_profit',[UserProfittedController::class,'request_daily_profit'])->name('request.daily_profit')->middleware('user_middleware');
Route::post('/request/first_level',[UserProfittedController::class,'request_first_level'])->name('request.first_level')->middleware('user_middleware');

Route::get('/user/daily_profit_accept',[UserProfittedController::class,'user_daily_profit_accept'])->name('user.daily_profit_accept')->middleware('user_middleware');
Route::get('/first/level/commission/record',[UserProfittedController::class,'first_level_commission_record'])->name('first_level_commission.record')->middleware('user_middleware');

Route::post('/request/second_level',[UserProfittedController::class,'request_second_level'])->name('request.second_level')->middleware('user_middleware');

Route::get('/second/level/commission/record',[UserProfittedController::class,'second_level_commission_record'])->name('second_level_commission.record')->middleware('user_middleware');

Route::post('/req/refer/withdraw',[UserProfittedController::class,'req_refer_withdraw'])->name('req.refer_withdraw')->middleware('user_middleware');

Route::get('/refer/record',[UserProfittedController::class,'refer_record'])->name('refer.record')->middleware('user_middleware');
Route::get('/user/profile',[UserProfittedController::class,'user_profile'])->name('user.profile')->middleware('user_middleware');
Route::post('/user/profile/change',[UserProfittedController::class,'user_profile_change'])->name('user.profile_change')->middleware('user_middleware');
Route::post('/req/money_frm_cus',[UserProfittedController::class,'req_money_frm_cus'])->name('req.money_frm_cus')->middleware('user_middleware');

Route::get('/list_of_req',[UserProfittedController::class,'list_of_req'])->name('list_of_req')->middleware('user_middleware');
Route::get('/level/1',[UserProfittedController::class,'lvl1'])->name('lvl1')->middleware('user_middleware');
Route::get('/level/2',[UserProfittedController::class,'lvl2'])->name('lvl2')->middleware('user_middleware');
Route::get('/ai',[UserProfittedController::class,'ai'])->name('ai')->middleware('user_middleware');
Route::get('/invite',[UserProfittedController::class,'invite'])->name('invite')->middleware('user_middleware');
Route::get('/total',[UserProfittedController::class,'total'])->name('total')->middleware('user_middleware');
Route::get('/refer/link',[UserProfittedController::class,'refer_link'])->name('refer.link')->middleware('user_middleware');
Route::get('/remaining_deposit',[UserProfittedController::class,'remaining_deposit'])->name('remaining.deposit')->middleware('user_middleware');

Route::get('/n_level_testing', [MailControlller::class, 'n_level_test'])->name('n_level_test')->middleware('user_middleware');






// 

//Admin Login


Route::get('/admin',[AdminController::class,'admin_login'])->name('admin.login');
Route::post('/admin/login/confirm',[AdminController::class,'admin_login_confirm'])->name('admin.login.confirm');
Route::get('/admin/dashboard',[AdminController::class,'admin_dashboard'])->name('admin.dashboard')->middleware('admin_middleware');

Route::get('/invest/limit',[AdminController::class,'invest_limit'])->name('invest.limit')->middleware('admin_middleware');
Route::post('/invest/limit/insert',[AdminController::class,'invest_limit_insert'])->name('invest.limit_insert')->middleware('admin_middleware');

Route::get('/invest/request_page',[AdminController::class,'invest_request_page'])->name('invest.request_page')->middleware('admin_middleware');
Route::get('/accept/request_page',[AdminController::class,'accept_request_page'])->name('accept.request_page')->middleware('admin_middleware');

Route::get('/money/request_from_user',[AdminController::class,'money_request_from_user'])->name('money.request_from_user')->middleware('admin_middleware');
Route::get('/accept/money/{investId}/{userId}',[AdminController::class,'accept_money'])->name('accept.money')->middleware('admin_middleware');
Route::get('/reject/money/{investId}/{userId}',[AdminController::class,'reject_money'])->name('reject.money')->middleware('admin_middleware');





Route::get('/accept/customer_invest/{investId}/{userId}',[AdminController::class,'accept_customer_invest'])->name('accept.customer_invest')->middleware('admin_middleware');
Route::get('/reject/customer_invest/{id}',[AdminController::class,'reject_customer_invest'])->name('reject.customer_invest')->middleware('admin_middleware');


Route::get('/profit/percentage_add',[AdminController::class,'profit_percentage_add'])->name('profit.percentage_add')->middleware('admin_middleware');
Route::post('/profit/percentage/add/confirm',[AdminController::class,'profit_percentage_add_confirm'])->name('profit_percentage_add.confirm')->middleware('admin_middleware');

Route::get('/user_list/admin',[AdminController::class,'user_list_admin'])->name('user_list.admin')->middleware('admin_middleware');
Route::get('/daily/profit/{id}',[AdminController::class,'daily_profit'])->name('daily.profit')->middleware('admin_middleware');
Route::get('/user/daily_porfit_pertially_frm_admin/{id}',[AdminController::class,'user_daily_porfit_pertially_frm_admin'])->name('user.daily_porfit_pertially_frm_admin')->middleware('admin_middleware');

Route::get('/refer/balance/sheet/{id}',[AdminController::class,'refer_balance_sheet'])->name('refer_balance.sheet')->middleware('admin_middleware');

Route::get('/daily/first_lvl_commission/sheet/{id}',[AdminController::class,'daily_first_lvl_commission_sheet'])->name('daily_first_lvl_commission.sheet')->middleware('admin_middleware');

Route::get('/daily/second_lvl/commission/sheet/{id}',[AdminController::class,'daily_second_lvl_commission_sheet'])->name('daily_second_lvl_commission.sheet')->middleware('admin_middleware');
Route::get('/package/withdraw/req',[AdminController::class,'package_withdraw_req'])->name('package_withdraw_req')->middleware('admin_middleware');

Route::get('/accept/invest/withdraw/{id}',[AdminController::class,'accept_invest_withdraw'])->name('accept.invest_withdraw')->middleware('admin_middleware');
Route::get('/package/withdraw/accepted',[AdminController::class,'package_withdraw_accepted'])->name('package_withdraw_accepted')->middleware('admin_middleware');
Route::get('/reject/invest/withdraw/{id}',[AdminController::class,'reject_invest_withdraw'])->name('reject.invest_withdraw')->middleware('admin_middleware');
Route::get('/user/details/by_admin/{id}',[AdminController::class,'user_details_by_admin'])->name('user.details_by_admin')->middleware('admin_middleware');
Route::get('/daily/profit_req',[AdminController::class,'daily_profit_req'])->name('daily.profit_req')->middleware('admin_middleware');
Route::get('/accept/daily_profit/{id}',[AdminController::class,'accept_daily_profit'])->name('accept.daily_profit')->middleware('admin_middleware');
Route::get('/reject/daily_profit/{id}',[AdminController::class,'reject_daily_profit'])->name('reject.daily_profit')->middleware('admin_middleware');

Route::get('/first_level/withdraw_req_sheet',[AdminController::class,'first_level_withdraw_req_sheet'])->name('first_level.withdraw_req_sheet')->middleware('admin_middleware');


Route::get('/accept/first_lvl/{id}',[AdminController::class,'accept_first_lvl'])->name('accept.first_lvl')->middleware('admin_middleware');
Route::get('/accept/first_lvl/{id}',[AdminController::class,'accept_first_lvl'])->name('accept.first_lvl')->middleware('admin_middleware');


Route::get('/second/level/withdraw/req/sheet',[AdminController::class,'second_level_withdraw_req_sheet'])->name('second_level.withdraw_req_sheet')->middleware('admin_middleware');

Route::get('/accept/second_level/{id}',[AdminController::class,'accept_second_level'])->name('accept.second_level')->middleware('admin_middleware');
Route::get('/reject/second_level/{id}',[AdminController::class,'reject_second_level'])->name('reject.second_level')->middleware('admin_middleware');

Route::get('/refer/request',[AdminController::class,'refer_request'])->name('refer.request')->middleware('admin_middleware');
Route::get('/deposit/withdraw',[AdminController::class,'deposit_withdraw'])->name('deposit.withdraw')->middleware('admin_middleware');


Route::get('/balance/withdraw', [MailControlller::class, 'balance_withdraw'])->name('balance.withdraw');

Route::get('/accept/deposit/{id}',[MailControlller::class,'accept_deposit'])->name('accept.deposit')->middleware('admin_middleware');
Route::get('/reject/deposit/{id}',[MailControlller::class,'reject_deposit'])->name('reject.deposit')->middleware('admin_middleware');


Route::get('/accept/balance/{id}',[MailControlller::class,'accept_balance'])->name('accept.balance')->middleware('admin_middleware');
Route::get('/reject/balance/{id}',[MailControlller::class,'reject_balance'])->name('reject.balance')->middleware('admin_middleware');

Route::post('/send/money/{id}',[MailControlller::class,'send_money_by_admin'])->name('send.money_by_admin')->middleware('admin_middleware');





Route::get('/accept/refer/{id}',[AdminController::class,'accept_refer'])->name('accept.refer')->middleware('admin_middleware');
Route::get('/reject/refer/{id}',[AdminController::class,'reject_refer'])->name('reject.refer')->middleware('admin_middleware');

Route::get('/admin/logout',[AdminController::class,'admin_logout'])->name('admin.logout');

Route::get('/reject/customer/{id}',[AdminController::class,'reject_customer'])->name('reject.customer')->middleware('admin_middleware');
Route::get('/rejected/request_page',[AdminController::class,'rejected_request_page'])->name('rejected.request_page')->middleware('admin_middleware');


Route::get('/coinremitter/balance', [CoinremitterController::class, 'getBalance']);
Route::get('/coinremitter/new-address', [CoinremitterController::class, 'getNewAddress']);
Route::get('/coinremitter/withdraw', [CoinremitterController::class, 'withdrawAmount']);
Route::get('/coinremitter/validate_address', [CoinremitterController::class, 'validate_address']);
Route::get('/testing', [CoinremitterController::class, 'testing'])->name('testing');
Route::get('/testing_withdraw', [CoinremitterController::class, 'testing_withdraw'])->name('testing.withdraw');
Route::get('/list_of_with', [CoinremitterController::class, 'list_of_with'])->name('list_of_with');
Route::get('/n_typs', [CoinremitterController::class, 'n_type'])->name('n.type');

Route::get('/send/mail', [MailControlller::class, 'index'])->name('mail.send');
Route::get('/send/mail', [MailControlller::class, 'index'])->name('mail.send');


Route::post('/getWalletBalance', [MailControlller::class, 'getWalletBalance'])->name('getWalletBalance');

Route::post('/withdraw_request', [MailControlller::class, 'withdraw_request'])->name('withdraw.request');
Route::get('/admin_logout', [MailControlller::class, 'admin_logout'])->name('admin.logout');








Route::get('/n_level_testing', [MailControlller::class, 'n_level_test'])->name('n_level_test')->middleware('user_middleware');



Route::get('/practise_daily', [MailControlller::class, 'practise_daily'])->name('practise.daily')->middleware('user_middleware');
