import { Component, Input } from '@angular/core';
import { Leg, MultiLegFlight } from '@app/shared/models-legacy';
import { OldAirportVisibilityService } from '@shared/services/old-airport-visibility.service';

@Component({
    selector: 'flight-details-row-part-header',
    templateUrl: './flight-details-row-part-header.component.html',
    styleUrls: [
        './flight-details-row-part-header.component.scss',
        './flight-details-row-part-header.component.mobile.scss',
        './flight-details-row-part-header.component.tablets.scss',
    ],
})
export class FlightDetailsRowPartHeaderComponent {
    @Input() flight: MultiLegFlight;
    @Input() leg: Leg;
    @Input() crossIndex: number;

    constructor(private airportService: OldAirportVisibilityService) {}

    get departureStationForTerminalChange() {
        return this.airportService.departureStationForTerminalChange(this.leg);
    }

    get arrivalStationForTerminalChange() {
        return this.airportService.arrivalStationForTerminalChange(this.leg);
    }
}
