<?php

namespace App\Http\Requests\Member;

use Illuminate\Foundation\Http\FormRequest;

// ══════════════════════════════════════════════════════════════════
//  InPractice — RespondFreelanceMatchRequest
//  Location: app/Http/Requests/Member/RespondFreelanceMatchRequest.php
//
//  Validates a provider's response to a freelance match interest.
//  Response must be either interested or declined.
// ══════════════════════════════════════════════════════════════════

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

    public function rules(): array
    {
        return [
            'response' => ['required', 'string', 'in:interested,declined'],
        ];
    }

    public function messages(): array
    {
        return [
            'response.required' => __('freelance.validation.response_required'),
            'response.in'       => __('freelance.validation.response_invalid'),
        ];
    }
}