<?php

namespace App\Http\Requests\Settings;

use App\Enums\DietaryRestriction;
use App\Enums\StylePreference;
use Illuminate\Foundation\Http\FormRequest;
use Illuminate\Validation\Rule;

class PreferenceUpdateRequest extends FormRequest
{
    /**
     * @return array<string, mixed>
     */
    public function rules(): array
    {
        return [
            'dietary_restrictions' => ['nullable', 'array'],
            'dietary_restrictions.*' => ['required', Rule::enum(DietaryRestriction::class)],
            'style_preferences' => ['nullable', 'array'],
            'style_preferences.*' => ['required', Rule::enum(StylePreference::class)],
            'other_notes' => ['nullable', 'string', 'max:1000'],
        ];
    }
}
