<?php

namespace App\Http\Requests;

use App\Models\Pouzivatel\PouzivatelStavEnum;
use Illuminate\Foundation\Http\FormRequest;
use Spatie\Enum\Laravel\Http\EnumRequest;
use Spatie\Enum\Laravel\Http\Requests\TransformsEnums;

/**
 * Class PouzivatelUpdateRequest
 *
 * @package App\Http\Requests
 */
final class PouzivatelUpdateRequest extends FormRequest
{
    use TransformsEnums;

    /**
     * Determine if the user is authorized to make this request.
     *
     * @return bool
     */
    public function authorize()
    {
        return true;
    }

    /**
     * Get the validation rules that apply to the request.
     *
     * @return array
     */
    public function rules()
    {
        return [
            'stav' => 'required',
        ];
    }

    /**
     * @return string[]
     */
    public function enums(): array
    {
        return [
            EnumRequest::REQUEST_REQUEST => [
                'stav' => PouzivatelStavEnum::class,
            ],
        ];
    }
}
