<?php

namespace App\Http\Requests;

use App\Models\InventoryTransferDocument;
use Illuminate\Foundation\Http\FormRequest;

class CancelInventoryTransferDocumentDraftRequest extends FormRequest
{
    public function authorize(): bool
    {
        /** @var InventoryTransferDocument $document */
        $document = $this->route('inventory_transfer_document');

        return $this->user()->can('cancelDraft', $document);
    }

    /**
     * @return array<string, array<int, mixed>>
     */
    public function rules(): array
    {
        return [];
    }
}
