<?php

namespace App\Http\Requests\Player;

use App\Http\Requests\ApiFormRequest;
use App\Http\Requests\Admin\Concerns\AdminAccountFieldRules;

final class PlayerPasswordUpdateRequest extends ApiFormRequest
{
    use AdminAccountFieldRules;

    public function authorize(): bool
    {
        return true;
    }

    public function rules(): array
    {
        return [
            'current_password' => ['required', 'string', 'max:128'],
            'password' => [...$this->nativePlayerPasswordRules(required: true), 'confirmed'],
        ];
    }
}
