<?php
declare(strict_types=1);

namespace App\Modules\Cron;

use App\Modules\Settings\ShopproPaymentStatusSyncService;

final class ShopproPaymentStatusSyncHandler
{
    public function __construct(private readonly ShopproPaymentStatusSyncService $syncService)
    {
    }

    /**
     * @param array<string, mixed> $payload
     * @return array<string, mixed>
     */
    public function handle(array $payload): array
    {
        return $this->syncService->sync([
            'per_integration_limit' => (int) ($payload['per_integration_limit'] ?? 100),
        ]);
    }
}
