<?php

namespace App\Http\Requests\Administrator;

use App\Http\Requests\ApiFormRequest;

class SendTeacherSubmissionNotificationsRequest extends ApiFormRequest
{
    public function authorize(): bool
    {
        return auth()->check();
    }

    public function rules(): array
    {
        return [
            'notify' => ['required', 'array', 'min:1'],
            'missing_items' => ['nullable', 'array'],
        ];
    }

    public function messages(): array
    {
        return [
            'notify.required' => 'Select at least one teacher to notify.',
            'notify.array' => 'Notify payload must be an array.',
            'notify.min' => 'Select at least one teacher to notify.',
            'missing_items.array' => 'Missing items payload must be an array.',
        ];
    }
}
