<?php

use App\Http\Middleware\TrackVisitor;
use App\Livewire\Home\AboutUs;
use App\Livewire\Home\Announcement;
use App\Livewire\Home\ContactUs;
use App\Livewire\Home\Index;
use App\Livewire\Home\News\Index as NewsIndex;
use App\Livewire\Home\News\Show as NewsShow;
use Illuminate\Support\Facades\Route;

Route::middleware([TrackVisitor::class])->group(function () {
    Route::get('/', Index::class)->name('home');

    Route::get('/about-us', AboutUs::class)->name('about-us');

    Route::prefix('news')->group(function () {
        Route::get('/', NewsIndex::class)->name('news.index');
        Route::get('/{news:slug}', NewsShow::class)->name('news.show');
    });

    Route::get('/announcements', Announcement::class)->name('announcement');

    Route::get('/contact-us', ContactUs::class)->name('contact-us');
});
