<?php

declare(strict_types=1);

use Illuminate\Support\Facades\Route;
use Maestro\Core\Modules\Items\Http\Controllers\ItemController;

Route::middleware(['web', 'auth:sanctum', 'maestro.module:items'])
    ->prefix('api/items')
    ->group(function (): void {
        Route::get('/', [ItemController::class, 'index']);
        Route::post('/', [ItemController::class, 'store']);
        Route::patch('/{item}', [ItemController::class, 'update']);
        Route::delete('/{item}', [ItemController::class, 'destroy']);
    });
