<?php

use Illuminate\Support\Facades\Route;

use App\Http\Controllers\MedicalRecapController;
use App\Http\Controllers\AuthController;
use App\Http\Controllers\UserController;

Route::get('/login', [AuthController::class, 'showLogin'])->name('login');
Route::post('/login', [AuthController::class, 'login'])->name('login.post');
Route::post('/logout', [AuthController::class, 'logout'])->name('logout');

Route::middleware(['auth'])->group(function () {
    Route::get('/', [MedicalRecapController::class, 'index'])->name('medical.index');
    Route::post('/import', [MedicalRecapController::class, 'import'])->name('medical.import');
    Route::get('/export-pdf', [MedicalRecapController::class, 'exportPdf'])->name('medical.export-pdf');
    Route::post('/clear', [MedicalRecapController::class, 'clear'])->name('medical.clear');
    
    Route::post('/users', [UserController::class, 'store'])->name('users.store');
});
