<?php

namespace App\Modules\Settings\Onboarding\Requests;

use Illuminate\Foundation\Http\FormRequest;

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

    public function rules(): array
    {
        return [
            'legal_name' => ['required', 'string', 'max:200'],
            'trade_name' => ['nullable', 'string', 'max:200'],
            'phone' => ['nullable', 'string', 'max:40'],
            'country' => ['nullable', 'string', 'max:80'],
        ];
    }
}
