<?php

namespace App\Modules\HR\Recruitment\Requests;

use Illuminate\Foundation\Http\FormRequest;

class BulkDestroyOfferLettersRequest extends FormRequest
{
    public function authorize(): bool
    {
        return $this->user()?->can('recruitment.manage') ?? false;
    }

    /** @return array<string, mixed> */
    public function rules(): array
    {
        return [
            'ids' => ['required', 'array', 'min:1'],
            'ids.*' => ['integer', 'distinct'],
        ];
    }
}
