<?php
/**
 * Minimal VA Flight Ops / smartCARS flight-status bridge sample.
 * Adapt to your VA platform. BlueNova reference: api/smartcars.php
 *
 * Required routes (Bearer = smartCARS session):
 *   GET  /flights/status/bookings
 *   GET  /flights/status?kind=&id=
 *   GET  /flights/status/history?kind=&id=&limit=
 *   POST /flights/status  { kind, id, status, etd, eta?, depParking?, arrParking? }
 *
 * Recommended for plugin 1.11+ gate pickers:
 *   GET  /flights/parkings?icao={ICAO|hub}&q={optional}
 *   GET  /flights/parkings/airports
 *
 * BlueNova ships ~90+ airports in va-msfs-parkings.php plus regional MSFS profiles
 * for any ICAO (partner VAs). GET /flights/parkings/airports returns full list + stats.
 *
 * Statuses: on_time | updated | delayed | cancelled | arrived
 */

declare(strict_types=1);

header('Content-Type: application/json; charset=utf-8');

echo json_encode([
    'ok' => false,
    'message' => 'Replace this sample with your VA API implementation.',
    'contract' => [
        'bookings' => 'GET /flights/status/bookings',
        'get' => 'GET /flights/status?kind=schedule|charter&id=',
        'history' => 'GET /flights/status/history?kind=&id=&limit=12',
        'set' => 'POST /flights/status',
        'parkings' => 'GET /flights/parkings?icao=',
        'parking_airports' => 'GET /flights/parkings/airports',
        'statuses' => ['on_time', 'updated', 'delayed', 'cancelled', 'arrived'],
        'gate_fields' => ['depParking', 'arrParking', 'originIcao', 'destinationIcao'],
    ],
], JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES);
