<?php
use Illuminate\Support\Facades\Route;
use App\Http\Livewire\Equipos;
use App\Http\Livewire\ControlDiario;
use App\Http\Livewire\Dashboard;
use App\Http\Livewire\Usuarios;
use Illuminate\Support\Facades\Auth;


// Rutas de autenticación (incluye login)
Auth::routes(); // o Auth::routes(['register' => false]);

// Dashboard como página inicial (requiere login)
//Route::get('/', Dashboard::class)->middleware('auth')->name('dashboard');
//Route::get('/dashboard', Dashboard::class)->middleware('auth');

Route::get('/dashboard', Dashboard::class)->middleware('auth')->name('dashboard');
Route::get('/', Dashboard::class)->middleware('auth');

// Módulos protegidos
Route::middleware('auth')->group(function () {
    Route::view('/equipos', 'equipos')->name('equipos');
    Route::view('/talleres', 'talleres')->name('talleres');
    Route::view('/dashboard', 'dashboard')->name('dashboard');
    Route::view('/control-diario', 'control-diario')->name('control.diario.live');
    Route::get('/usuarios', Usuarios::class)->name('usuarios');
});
