<?php

use App\Livewire\LoginForm;
use App\Livewire\Branch;
use App\Livewire\CardMember;
use App\Livewire\CardType;
use App\Livewire\Fuel;
use App\Livewire\LockedAccount;
use App\Livewire\MainContentManager;
use App\Livewire\MobileUsageReport;
use App\Livewire\TopUp;
use App\Livewire\Profile;
use App\Livewire\Promotion;
use App\Livewire\Notification;
use App\Livewire\PhotoSlider;
use App\Livewire\RegistrationReport;
use App\Livewire\Station;
use App\Livewire\StationRatingReport;
use App\Livewire\SystemParameter;
use App\Livewire\TermsAndPrivacy;
use App\Livewire\TopUpUsageReport;
use App\Livewire\UserManagement;
use Illuminate\Support\Facades\Route;


//laravel page
Route::get('/', function () {
    return redirect()->route('login'); 
});
Route::get('/login', function () {
    return view('auth.log-in');
})->name('login');


// // Route::get('/login', LoginForm::class)->name('layouts.app');

// // Route::get('/dashboard', function () {
// //     return view('main.dashboard'); // This view extends layouts.dashboard
// // });

// // Route::get('/main', MainContentManager::class)->name('main.dashboard');

// // Route::get('/main/profile', Profile::class)->name('profile.profile');
// Route::get('/main/user-management', UserManagement::class)->name('user-management.user-management');
// // Route::get('/main/notification', Notification::class)->name('notification.notification');
// // Route::get('/main/member-management/card-member', CardMember::class)->name('member-management.card-member');
// // Route::get('/main/member-management/locked-account', LockedAccount::class)->name('member-management.locked-account');
// // Route::get('/main/home-page-mobile/photo-slider', PhotoSlider::class)->name('home-page-mobile.photo-slider');
// // Route::get('/main/promotion', Promotion::class)->name('promotion.promotion');
// // Route::get('/main/top-up', TopUp::class)->name('top-up.top-up');
// // Route::get('/main/about-us/card-type', CardType::class)->name('about-us.card-type');
// // Route::get('/main/about-us/terms-and-privacy', TermsAndPrivacy::class)->name('about-us.terms-and-privacy');
// // Route::get('/main/report/registration-report', RegistrationReport::class)->name('report.registration-report');
// // Route::get('/main/report/top-up-usage-report', TopUpUsageReport::class)->name('report.top-up-usage-report');
// // Route::get('/main/report/mobile-usage-report', MobileUsageReport::class)->name('report.mobile-usage-report');
// // Route::get('/main/report/station-rating-report', StationRatingReport::class)->name('report.station-rating-report');
// // Route::get('/main/system-parameter', SystemParameter::class)->name('system-parameter.system-parameter');
// // Route::get('/main/station-locator/branch', Branch::class)->name('station-locator.branch');
// // Route::get('/main/station-locator/station', Station::class)->name('station-locator.station');
// // Route::get('/main/station-locator/fuel', Fuel::class)->name('station-locator.fuel');

Route::get('/main/{page?}', function () {
    return view('main.dashboard');
})->where('page', '.*');

Route::get('/main/user-management/user-create', function () {
    return view('main.dashboard', ['activePage' => 'user-create']);
})->name('user-create');

Route::get('/main/notification/notification-create', function () {
    return view('main.dashboard', ['activePage' => 'notification-create']);
})->name('notification-create');

Route::get('/main/home-page-mobile/photo-slider-create', function () {
    return view('main.dashboard', ['activePage' => 'photo-slider-create']);
})->name('photo-slider-create');

Route::get('/main/promotion/promotion-create', function () {
    return view('main.dashboard', ['activePage' => 'promotion-create']);
})->name('promotion-create');

Route::get('/main/top-up/top-up-create', function () {
    return view('main.dashboard', ['activePage' => 'top-up-create']);
})->name('top-up-create');

Route::get('/main/about-us/card-type-create', function () {
    return view('main.dashboard', ['activePage' => 'card-type-create']);
})->name('card-type-create');

Route::get('/main/about-us/terms-and-privacy-create', function () {
    return view('main.dashboard', ['activePage' => 'terms-and-privacy-create']);
})->name('terms-and-privacy-create');

Route::get('/main/station-locator/branch-create', function () {
    return view('main.dashboard', ['activePage' => 'branch-create']);
})->name('branch-create');

Route::get('/main/station-locator/station-create', function () {
    return view('main.dashboard', ['activePage' => 'station-create']);
})->name('station-create');

Route::get('/main/station-locator/fuel-create', function () {
    return view('main.dashboard', ['activePage' => 'fuel-create']);
})->name('fuel-create');