<?php

use Illuminate\Support\Facades\Route;
use Livewire\Volt\Volt;
use App\Http\Controllers\CampController;
use App\Http\Livewire\CampApplications;
use App\Livewire\Admin\BookingManagement;
use App\Http\Controllers\ContactController;

Route::middleware(['web', 'auth', 'is_admin'])->group(function () {
    Route::get('/admin/bookings', BookingManagement::class)->name('admin.bookings');
});


Route::post('/contact', [ContactController::class, 'send'])->name('contact.send');

Route::get('/', function () {
    return view('welcome');
})->name('home');

Route::view('dashboard', 'dashboard')
    ->middleware(['auth', 'verified'])
    ->name('dashboard');

Route::middleware(['auth'])->group(function () {
    Route::redirect('settings', 'settings/profile');

    Volt::route('settings/profile', 'settings.profile')->name('settings.profile');
    Volt::route('settings/password', 'settings.password')->name('settings.password');
    Volt::route('settings/appearance', 'settings.appearance')->name('settings.appearance');

});


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


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

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


require __DIR__ . '/auth.php';
