<?php

namespace App\Http\Requests\Renewals;

use Illuminate\Foundation\Http\FormRequest;

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

    public function rules(): array
    {
        return [
            'service_id' => ['required', 'integer'],
        ];
    }
}
