<?php

use Illuminate\Support\Facades\Route;
use Illuminate\Support\Facades\Auth;
use App\Http\Controllers\FrontendController\HomeController;
use App\Http\Controllers\FrontendController\PageController;

/*
|--------------------------------------------------------------------------
| Web Routes (CSRF Protected)
|--------------------------------------------------------------------------
| All routes are protected by Laravel's "web" middleware
| which includes CSRF protection, sessions, and cookies.
*/

// Auth routes
Auth::routes();

    /*
    |--------------------------------------------------------------------------
    | Home Pages (Public)
    |--------------------------------------------------------------------------
    */
Route::controller(HomeController::class)->group(function () {
    Route::get('/', 'indexOne')->name('home');
    Route::get('index-two', 'indexTwo')->name('indexTwo');
    Route::get('index-three', 'indexThree')->name('indexThree');
    Route::get('index-four', 'indexFour')->name('indexFour');
    Route::get('index-five', 'indexFive')->name('indexFive');
    Route::get('index-six', 'indexSix')->name('indexSix');
    Route::get('index-seven', 'indexSeven')->name('indexSeven');
    Route::get('index-eight', 'indexEight')->name('indexEight');
});

    /*
    |--------------------------------------------------------------------------
    | Public Pages (No Authentication Required)
    |--------------------------------------------------------------------------
    */
Route::controller(PageController::class)->group(function () {
    Route::get('about', 'about')->name('about');
    Route::get('become-volunteer', 'becomeVolunteer')->name('become.volunteer');
    Route::get('cart', 'cart')->name('cart');
    Route::get('cause-details', 'causeDetails')->name('cause.details');
    Route::get('checkout', 'checkout')->name('checkout');

    Route::get('events', 'events')->name('events');
    Route::get('events-details', 'eventsDetails')->name('events.details');

    Route::get('our-causes', 'ourCauses')->name('our.causes');
    Route::get('our-team', 'ourTeam')->name('our.team');

    Route::get('shop', 'shop')->name('shop');
    Route::get('product-details', 'productDetails')->name('product.details');

    Route::get('team-details', 'teamDetails')->name('team.details');

    Route::get('faq', 'faq')->name('faq');
        
    // Blog
    Route::get('blog', 'blog')->name('blog');
    Route::get('blog-grid', 'blogGrid')->name('blog.grid');
    Route::get('blog-details', 'blogDetails')->name('blog.details');

        
    // Contact
    Route::get('contact', 'contact')->name('contact');
    Route::post('contact', 'submitContact')->name('contact.submit');
        
    Route::get('donate-us', 'donateUs')->name('donate.us');
    Route::post('donate-us', 'submitDonate')->name('donate.submit');
    Route::get('privacy-policy', 'privacyPolicy')->name('privacy.policy');
    Route::get('terms-conditions', 'termsConditions')->name('terms.conditions');

    Route::get('404', 'notFound')->name('not.found');
});

    /*
    |--------------------------------------------------------------------------
    | Auth Routes (Authentication Required)
    |--------------------------------------------------------------------------
    */
Route::middleware(['auth'])->group(function () {
    // Protected routes can be defined here
});

