<?php

namespace App\Http\Requests\Admin;

use App\Enums\FeedbackType;
use Illuminate\Foundation\Http\FormRequest;
use Illuminate\Validation\Rule;

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

    public function rules(): array
    {
        return [
            'type' => ['required', 'string', Rule::in(FeedbackType::values())],
            'subject' => ['required', 'string', 'max:150'],
            'message' => ['required', 'string'],
        ];
    }
}
