<?php

use Illuminate\Support\Facades\Route;
use App\Livewire\Dashboard;

Route::middleware('guest')->group(function () {
    Route::get('/', App\Livewire\Auth\Login::class)->name('login');
    Route::get('/login', App\Livewire\Auth\Login::class)->name('login');
    //Route::get('/register', App\Livewire\Auth\Register::class)->name('register');
});


Route::middleware(['auth'])->group(function () {
      Route::post('/logout', function () {
        Auth::logout();
        return redirect('/');
    })->name('logout');
    Route::get('/dashboard', Dashboard::class)->name('dashboard');
    Route::get('/home', App\Livewire\Home::class)->name('dashboard');
    Route::get('/categories',App\Livewire\CategoryController::class)->name('categories');
    Route::get('/files',App\Livewire\FileController::class)->name('files');
    Route::get('/files/{id}', App\Livewire\FileView::class)->name('file.view');
    Route::get('/attachments',App\Livewire\FileAttachmentController::class)->name('attachments');
    Route::get('/notices',App\Livewire\NoticeUpdateController::class)->name('notices');
    Route::get('/stages', App\Livewire\StageController::class)->name('stages');
    Route::get('/users', App\Livewire\UserController::class)->name('users');
    Route::get('/roles', App\Livewire\RolesController::class)->name('roles');
    Route::get('/profile', App\Livewire\ProfileController::class)->name('profile');
    Route::get('/file-stage-assignments', App\Livewire\FileStageAssignmentController::class)->name('file-stage-assignments');
    Route::get('/activity-logs', App\Livewire\AuditLogsController::class)->name('audit-logs');
    Route::get('/analytics', App\Livewire\AnalyticsController::class)->name('analytics');
    Route::get('/reports', App\Livewire\ReportsController::class)->name('reports');
    Route::get('/attachment-types', App\Livewire\AttachmentTypeController::class)->name('attachment-types');
    Route::get('/permissions', App\Livewire\PermissionsController::class)->name('permissions');
});