"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.VehicleDescriptor = void 0;
const VehicleIdGenerator_1 = require("./VehicleIdGenerator");
class VehicleDescriptor {
    getVehicleDescriptor(tripRecord) {
        return {
            id: VehicleIdGenerator_1.VehicleIdGenerator.getVehicleId(tripRecord.id, tripRecord.gtfs_route_type, tripRecord.provider_source_type, tripRecord.gtfs_route_short_name, tripRecord.cis_trip_number, tripRecord.vehicle_registration_number, tripRecord.run_number, tripRecord.internal_run_number),
            ...(tripRecord.vehicle_registration_number && {
                label: tripRecord.vehicle_registration_number.toString(),
            }),
            ".transit_realtime.ovapiVehicleDescriptor": {
                wheelchairAccessible: tripRecord.wheelchair_accessible ?? undefined,
                vehicleType: tripRecord.vehicle_descriptor
                    ? JSON.stringify({
                        airConditioned: tripRecord.vehicle_descriptor.is_air_conditioned,
                        usbChargers: tripRecord.vehicle_descriptor.has_usb_chargers,
                    })
                    : undefined,
            },
        };
    }
}
exports.VehicleDescriptor = VehicleDescriptor;
//# sourceMappingURL=VehicleDescriptor.js.map