"use strict";
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.PublicDepartureCacheTransformation = void 0;
const AbstractTransformation_1 = require("@golemio/core/dist/helpers/transformation/AbstractTransformation");
const tsyringe_1 = require("@golemio/core/dist/shared/tsyringe");
let PublicDepartureCacheTransformation = class PublicDepartureCacheTransformation extends AbstractTransformation_1.AbstractTransformation {
    constructor() {
        super(...arguments);
        this.name = "PublicDepartureCacheTransformation";
        this.transformInternal = (inputDto) => {
            const outputDto = {
                stop_id: inputDto.stop_id,
                departure_datetime: inputDto.departure_datetime.toISOString(),
                arrival_datetime: inputDto.arrival_datetime?.toISOString() ?? null,
                route_short_name: inputDto.route_short_name,
                route_type: inputDto.route_type,
                trip_id: inputDto.trip_id,
                stop_sequence: inputDto.stop_sequence,
                platform_code: inputDto.platform_code,
                trip_headsign: inputDto.stop_headsign ?? inputDto.trip_headsign,
            };
            return outputDto;
        };
    }
};
exports.PublicDepartureCacheTransformation = PublicDepartureCacheTransformation;
exports.PublicDepartureCacheTransformation = PublicDepartureCacheTransformation = __decorate([
    (0, tsyringe_1.injectable)()
], PublicDepartureCacheTransformation);
//# sourceMappingURL=PublicDepartureCacheTransformation.js.map