<?php

use Illuminate\Support\Facades\Route;
use Illuminate\Support\Facades\Http;
use App\Http\Controllers\AuthController;
use App\Http\Controllers\UserManagementController;
use App\Http\Controllers\PhotoSliderController;
use App\Http\Controllers\TopUpController;
use App\Http\Controllers\NotificationController;
use App\Http\Controllers\CardMemberController;
use App\Http\Controllers\PromotionController;
use App\Http\Controllers\TermsAndPrivacyController;
use App\Http\Controllers\CardTypeController;
use App\Http\Controllers\ReportsController;
use App\Http\Controllers\StationController;

Route::get('/', function () {
    return redirect()->route('login'); 
});


Route::get('/login', [AuthController::class, 'showLoginForm'])->name('login');
Route::post('/login', [AuthController::class, 'login'])->name('login');
Route::get('/change-password', [AuthController::class, 'showChangePasswordForm'])->name('change-password');
Route::post('/change-password', [AuthController::class, 'changePassword'])->name('password.change');
Route::get('/my-profile', [AuthController::class, 'showMyProfile'])->name('my-profile');
Route::post('/logout', [AuthController::class, 'logout'])->name('logout');


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

Route::get('/card-member', function () {
    return view('pages.member management.card-member');
})->name('card-member');

Route::get('/locked-accounts', function () {
    return view('pages.member management.locked-accounts');
})->name('locked-accounts');

Route::get('/top-up', function () {
    return view('pages.top-up');
})->name('top-up');

Route::get('/card-types', function () {
    return view('pages.about us.card-types');
})->name('card-types');

Route::get('/system-parameters', function () {
    return view('pages.system-parameters');
})->name('system-parameters');

Route::get('/branches', function () {
    return view('pages.station locator.branches');
})->name('branches');



Route::get('/fuels', function () {
    return view('pages.station locator.fuels');
})->name('fuels');

Route::get('/add-user', function () {
    return view('pages.user-management.add-user');
})->name('add-user');

Route::get('/add-notification', function () {
    return view('pages.add-notification');
})->name('add-notification');

Route::get('/photo-slider', function () {
    return view('pages.home page.photo-slider');
})->name('photo-slider');

Route::get('/promotions', function () {
    return view('pages.promotions');
})->name('promotions');

Route::get('/add-photo-slider', function () {
    return view('pages.add-photo-slider');
})->name('add-photo-slider');

Route::get('/add-promotions', function () {
    return view('pages.add-promotions');
})->name('add-promotions');


Route::get('/add-card-types', function () {
    return view('pages.add-card-types');
})->name('add-card-types');

Route::get('/add-terms-and-privacy', function () {
    return view('pages.add-terms-and-privacy');
})->name('add-terms-and-privacy');

Route::get('/add-branches', function () {
    return view('pages.add-branches');
})->name('add-branches');

Route::get('/add-fuels', function () {
    return view('pages.add-fuels');
})->name('add-fuels');

Route::get('/add-station', function () {
    return view('pages.add-station');
})->name('add-station'); 

//CMS-extension

Route::get('/top-up-settings', function () {
    return view('pages.top-up-settings');
})->name('top-up-settings'); 

Route::get('/fuel-price-on-demand', function () {
    return view('pages.fuel-price-on-demand');
})->name('fuel-price-on-demand'); 

Route::get('/fuel-price-schedule', function () {
    return view('pages.fuel-price-schedule');
})->name('fuel-price-schedule'); 

Route::get('/fuel-price-update-logs', function () {
    return view('pages.fuel-price-update-logs');
})->name('fuel-price-update-logs'); 

//User
Route::get('user-management', [UserManagementController::class, 'index'])->name('user.management');
Route::get('user-management/create', [UserManagementController::class, 'create'])->name('user-management.create');
Route::post('user-management', [UserManagementController::class, 'store'])->name('user-management.store');
Route::get('user-management/{uuid}', [UserManagementController::class, 'show'])->name('user-management.show');
Route::get('user-management/{uuid}/edit', [UserManagementController::class, 'edit'])->name('user-management.edit');
Route::put('user-management/{uuid}', [UserManagementController::class, 'update'])->name('user-management.update');
Route::delete('user-management/{uuid}', [UserManagementController::class, 'destroy'])->name('user-management.destroy');
Route::delete('user-management/batch', [UserManagementController::class, 'batchDelete'])->name('user-management.batchDelete');
Route::post('user-management/{uuid}/status', [UserManagementController::class, 'changeStatus'])->name('user-management.changeStatus');

//TopUp
Route::get('/top-up', [TopUpController::class, 'index'])->name('top-up');
Route::get('/top-up/create', [TopUpController::class, 'create'])->name('top-up.create');
Route::post('/top-up', [TopUpController::class, 'store'])->name('top-up.store');
Route::get('/top-up/{uuid}', [TopUpController::class, 'show'])->name('top-up.show');
Route::get('/top-up/{uuid}/edit', [TopUpController::class, 'edit'])->name('top-up.edit');
Route::put('/top-up/{uuid}', [TopUpController::class, 'update'])->name('top-up.update');
Route::delete('/top-up/{uuid}', [TopUpController::class, 'destroy'])->name('top-up.destroy');
Route::delete('/top-up/batch', [TopUpController::class, 'batchDelete'])->name('top-up.batchDelete');

//Photo Slider
Route::get('/photo-slider', [PhotoSliderController::class, 'index'])->name('photo-slider');
Route::get('/photo-slider/create', [PhotoSliderController::class, 'create'])->name('photo-slider.create');
Route::post('/photo-slider', [PhotoSliderController::class, 'store'])->name('photo-slider.store');
Route::get('/photo-slider/{id}/edit', [PhotoSliderController::class, 'edit'])->name('photo-slider.edit');
Route::put('/photo-slider/{id}', [PhotoSliderController::class, 'update'])->name('photo-slider.update');
Route::get('/photo-slider/{id}', [PhotoSliderController::class, 'show'])->name('photo-slider.show');
Route::delete('/photo-slider/{id}', [PhotoSliderController::class, 'destroy'])->name('photo-slider.destroy');
Route::delete('/photo-slider/batch', [PhotoSliderController::class, 'batchDelete'])->name('photo-slider.batchDelete');

//Notification
Route::get('/notification', [NotificationController::class, 'index'])->name('notification');
Route::get('/notification/create', [NotificationController::class, 'create'])->name('notification.create');
Route::post('/notification', [NotificationController::class, 'store'])->name('notification.store');

//Member Management
Route::get('/card-member', [CardMemberController::class, 'index'])->name('card-member');
Route::get('/card-member/{uuid}', [CardMemberController::class, 'show'])->name('card-member.show');
Route::get('/locked-account', [CardMemberController::class, 'lockedAccounts'])->name('locked-account');
Route::get('/locked-account/{uuid}', [CardMemberController::class, 'show'])->name('locked-account.show');
Route::post('/locked-account/activate/{uuid}', [CardMemberController::class, 'activate'])->name('locked-account.activate');
//Promotion
Route::get('/promotions', [PromotionController::class, 'index'])->name('promotions');
Route::get('/promotions/create', [PromotionController::class, 'create'])->name('promotions.create');
Route::post('/promotions', [PromotionController::class, 'store'])->name('promotions.store');
Route::get('/promotions/{uuid}', [PromotionController::class, 'show'])->name('promotions.show');
Route::get('/promotions/{uuid}/edit', [PromotionController::class, 'edit'])->name('promotions.edit');
Route::put('/promotions/{uuid}', [PromotionController::class, 'update'])->name('promotions.update');
Route::delete('/promotions/{uuid}', [PromotionController::class, 'destroy'])->name('promotions.destroy');
Route::post('/promotions/batch-delete', [PromotionController::class, 'batchDelete'])->name('promotions.batch-delete');

//Terms-and-Privacy
Route::get('/terms-and-privacy', [TermsAndPrivacyController::class, 'index'])->name('terms-and-privacy');
Route::get('/terms-and-privacy/create', [TermsAndPrivacyController::class, 'create'])->name('terms-and-privacy.create');
Route::post('/terms-and-privacy', [TermsAndPrivacyController::class, 'store'])->name('terms-and-privacy.store');
Route::get('/terms-and-privacy/{uuid}', [TermsAndPrivacyController::class, 'show'])->name('terms-and-privacy.show');
Route::get('/terms-and-privacy/{uuid}/edit', [TermsAndPrivacyController::class, 'edit'])->name('terms-and-privacy.edit');
Route::put('/terms-and-privacy/{uuid}', [TermsAndPrivacyController::class, 'update'])->name('terms-and-privacy.update');
Route::delete('/terms-and-privacy/{uuid}', [TermsAndPrivacyController::class, 'destroy'])->name('terms-and-privacy.destroy');
Route::delete('/terms-and-privacy/batch-delete', [TermsAndPrivacyController::class, 'batchDelete'])->name('terms-and-privacy.batchDelete');

//Card Types
Route::get('/card-types', [CardTypeController::class, 'index'])->name('card-types');
Route::get('/card-types/create', [CardTypeController::class, 'create'])->name('card-types.create');
Route::post('/card-types', [CardTypeController::class, 'store'])->name('card-types.store');
Route::get('/card-types/{uuid}', [CardTypeController::class, 'show'])->name('card-types.show');
Route::get('/card-types/{uuid}/edit', [CardTypeController::class, 'edit'])->name('card-types.edit');
Route::post('/card-types/{uuid}', [CardTypeController::class, 'update'])->name('card-types.update');
Route::delete('/card-types/{uuid}', [CardTypeController::class, 'destroy'])->name('card-types.destroy');
Route::delete('/card-types/batch-delete', [CardTypeController::class, 'batchDelete'])->name('card-types.batchDelete');

//Reports
Route::get('/mobile-usage-report', [ReportsController::class, 'mobileUsage'])->name('mobile-usage-report');
Route::get('/registration-report', [ReportsController::class, 'registration'])->name('registration-report');
Route::get('/station-rating-report', [ReportsController::class, 'stationRating'])->name('station-rating-report');
Route::get('/top-up-usage-report', [ReportsController::class, 'topUp'])->name('top-up-usage-report');

Route::get('/station-rating-reportExport', [ReportsController::class, 'exportStationRating'])->name('station-rating-reportExport');
Route::get('/mobile-usage-reportExport', [ReportsController::class, 'exportMobileUsage'])->name('mobile-usage-reportExport');
Route::get('/registration-reportExport', [ReportsController::class, 'exportRegistration'])->name('registration-reportExport');
Route::get('/top-up-usage-reportExport', [ReportsController::class, 'exportTopUp'])->name('top-up-usage-reportExport');

//Station
Route::get('/station-management', [StationController::class, 'index'])->name('stations');
Route::get('/stations/create', [StationController::class, 'create'])->name('stations.create');
// Route::post('/stations', [StationController::class, 'store'])->name('stations.store');
// Route::get('/stations/{id}', [StationController::class, 'show'])->name('stations.show');
// Route::get('/stations/{id}/edit', [StationController::class, 'edit'])->name('stations.edit');
// Route::put('/stations/{id}', [StationController::class, 'update'])->name('stations.update');
// Route::delete('/stations/{id}', [StationController::class, 'destroy'])->name('stations.destroy');

