<?php

declare(strict_types=1);

use App\Livewire\Guest\Dashboard;
use App\Livewire\Guest\SupportTickets\Index as GuestSupportTicketsIndex;
use App\Livewire\Shared\Profile;
use Illuminate\Support\Facades\Route;

/*
|--------------------------------------------------------------------------
| User Routes (Guest / buyer aliases)
|--------------------------------------------------------------------------
|
| Marketplace property, booking, and payment flows have been removed.
| Authenticated readers use the guest area for account basics and support.
|
*/

Route::middleware(['auth', 'verified'])->prefix('guest')->name('guest.')->group(function (): void {
    Route::get('/dashboard', Dashboard::class)->name('dashboard');
    Route::get('/support-tickets', GuestSupportTicketsIndex::class)->name('support-tickets.index');
});

// Buyer URLs kept as aliases for existing bookmarks and layout components
Route::middleware(['auth', 'verified'])->prefix('buyer')->name('buyer.')->group(function (): void {
    Route::get('/dashboard', fn () => redirect()->route('guest.dashboard'))->name('dashboard');
    Route::get('/support-tickets', fn () => redirect()->route('guest.support-tickets.index'))->name('support-tickets.index');
    Route::get('/account/settings', Profile::class)->name('settings');
});

Route::middleware(['auth', 'verified'])->group(function (): void {
    Route::get('/profile', Profile::class)->name('profile');
    Route::get('/settings', Profile::class)->name('settings');
    Route::get('/notifications', \App\Livewire\Shared\Notifications::class)->name('notifications');
});
