<?php

use App\Modules\HR\Assets\Controllers\AssetController;
use Illuminate\Support\Facades\Route;

Route::prefix('hr/assets')->name('hr.assets.')->middleware('module:hr')->group(function (): void {
    Route::get('/', [AssetController::class, 'index'])->name('index');
    Route::get('/create', [AssetController::class, 'create'])->name('create');
    Route::post('/', [AssetController::class, 'store'])->name('store');
    Route::get('/{asset}', [AssetController::class, 'show'])->name('show');
    Route::get('/{asset}/edit', [AssetController::class, 'edit'])->name('edit');
    Route::put('/{asset}', [AssetController::class, 'update'])->name('update');
    Route::post('/{asset}/assign', [AssetController::class, 'assign'])->name('assign');
    Route::post('/{asset}/transfer', [AssetController::class, 'transfer'])->name('transfer');
    Route::post('/{asset}/return', [AssetController::class, 'return'])->name('return');
    Route::post('/{asset}/damage', [AssetController::class, 'damage'])->name('damage');
});
