<?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\PhotoSliderViewController;



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('/photo-slider', [PhotoSliderViewController::class, 'index'])->name('photo-slider.index');

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

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('/promotions', function () {
    return view('pages.promotions');
})->name('promotions');

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('/terms-and-privacy', function () {
    return view('pages.about us.terms-and-privacy');
})->name('terms-and-privacy');

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

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

Route::get('/mobile-usage-report', function () {
    return view('pages.reports.mobile-usage-report');
})->name('mobile-usage-report');

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

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('/stations', function () {
    return view('pages.station locator.stations');
})->name('stations');

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-top-up', function () {
    return view('pages.add-top-up');
})->name('add-top-up');

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');