<?php

declare(strict_types=1);

use App\Http\Controllers\ReportController;
use Illuminate\Support\Facades\Route;

/*
|--------------------------------------------------------------------------
| Reports
|--------------------------------------------------------------------------
|
| `{report}` is a report key (e.g. "asset-register"), not a bound model —
| reports are declared in ReportService, not stored. `show`, `exportExcel`
| and `exportPdf` all resolve the same key against the same definition, so
| the on-screen table, the spreadsheet and the PDF can never disagree about
| what a report contains.
|
*/

Route::get('reports', [ReportController::class, 'index'])->name('reports.index');
Route::get('reports/{report}', [ReportController::class, 'show'])->name('reports.show');
Route::get('reports/{report}/export/excel', [ReportController::class, 'exportExcel'])->name('reports.export.excel');
Route::get('reports/{report}/export/pdf', [ReportController::class, 'exportPdf'])->name('reports.export.pdf');
