"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.PublicVehiclePositionsTransformation = void 0;
const RouteTypeEnums_1 = require("../../../../helpers/RouteTypeEnums");
const AbstractTransformation_1 = require("@golemio/core/dist/helpers/transformation/AbstractTransformation");
const Geo_1 = require("@golemio/core/dist/output-gateway/Geo");
class PublicVehiclePositionsTransformation extends AbstractTransformation_1.AbstractTransformation {
    constructor() {
        super(...arguments);
        this.name = "OutputDtoTransformation";
        this.transformInternal = ({ detailed_info, ...element }) => {
            return (0, Geo_1.buildGeojsonFeature)({
                ...element,
                route_type: (RouteTypeEnums_1.GTFSRouteTypeEnum[element.route_type] ?? RouteTypeEnums_1.GTFSRouteTypeEnum[1700]).toLowerCase(),
            }, "lng", "lat", true);
        };
    }
}
exports.PublicVehiclePositionsTransformation = PublicVehiclePositionsTransformation;
//# sourceMappingURL=PublicVehiclePositionsTransformation.js.map