<?php

namespace App\Http\Requests;

use App\Http\Requests\Concerns\ValidatesNotificationMapStructure;

class UpdateNotificationTemplate extends NotificationTemplateRequest
{
    use ValidatesNotificationMapStructure;

    /**
     * Get the validation rules that apply to the request.
     *
     * @return array<string, \Illuminate\Contracts\Validation\ValidationRule|array<mixed>|string>
     */
    #[\Override]
    public function rules(): array
    {
        return array_merge([
            'is_published' => ['required', 'boolean'],
            'title' => ['required', 'string', 'max:255'],
            'type' => ['sometimes', 'string', 'max:60'],
        ], $this->structureRules());
    }
}
