<?php

use App\Http\Controllers\APPXDepartmentController;
use App\Http\Controllers\APPXEmployeeController;
use App\Http\Controllers\CountController;
use App\Http\Controllers\EmployeeListController;
use App\Models\APPX_department;
use App\Models\APPX_employee;
use Illuminate\Foundation\Application;
use Illuminate\Support\Facades\Route;
use Inertia\Inertia;

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/

Route::get('/', function () {
    return Inertia::render('Welcome', [
        'canLogin' => Route::has('login'),
        'canRegister' => Route::has('register'),
        'laravelVersion' => Application::VERSION,
        'phpVersion' => PHP_VERSION,
    ]);
});

Route::middleware(['auth:sanctum', 'verified'])->get('/dashboard', function () {
    return Inertia::render('Dashboard');
})->name('dashboard');

Route::resource('department', APPXDepartmentController::class);
Route::resource('/employee', APPXEmployeeController::class);
Route::resource('/list', EmployeeListController::class);
Route::resource('/count', CountController::class);

Route::get('/X', function () {
    return Inertia::render('laX');
});
Route::get('/histograma', function () {
    return Inertia::render('histograma');
});
