<?php

namespace App\Domains\Catalog\Requests;

use Illuminate\Foundation\Http\FormRequest;

class CatalogVariantOptionsRequest extends FormRequest
{
    public function authorize(): bool
    {
        return true;
    }

    /** @return array<string, list<string>> */
    public function rules(): array
    {
        return [
            'selected_values' => ['sometimes', 'array'],
            'selected_values.*' => ['nullable'],
            'cart_item_id' => ['sometimes', 'nullable', 'integer', 'min:1'],
        ];
    }
}
