<?php

namespace App\Http\Requests;

use Illuminate\Foundation\Http\FormRequest;

class PendingProfileMediaRequest extends FormRequest
{
    public function authorize(): bool
    {
        return $this->user()?->canModerateClients()
            && $this->user()->canModerateProviders();
    }

    public function rules(): array
    {
        return [
            'page'     => 'sometimes|integer|min:1',
            'per_page' => 'sometimes|integer|min:1|max:100',
        ];
    }
}
