<?php

require_once __DIR__ . '/vendor/autoload.php';

$app = require_once __DIR__ . '/bootstrap/app.php';

$app->make(\Illuminate\Contracts\Console\Kernel::class)->bootstrap();

use App\Services\PerizinanApiService;

$service = new PerizinanApiService();
$data = $service->fetchFastestPermohonan('pertek', 5);

echo "API Response:\n";
print_r($data);

if ($data && isset($data['data']) && is_array($data['data'])) {
    echo "\nFirst item structure:\n";
    if (count($data['data']) > 0) {
        print_r($data['data'][0]);
    }
}
