<?php

namespace App\Http\Requests\Renewals;

use Illuminate\Foundation\Http\FormRequest;

class RenewalFollowUpRequest extends FormRequest
{
    public function authorize(): bool
    {
        return $this->user()?->hasPermission('renewals.manage') ?? false;
    }

    public function rules(): array
    {
        return [
            'activity_type' => ['required', 'in:call,whatsapp,email,meeting,note'],
            'notes' => ['required', 'string', 'max:2000'],
            'next_followup_at' => ['nullable', 'date'],
        ];
    }
}
