import { Component } from '@angular/core';
import { DetailsTitleBase } from '@components/title-base/details-title-base';
import { TranslatePipe } from '@ngx-translate/core';
import { OnlineBoardUrlBuilderService } from '@online-board/services/url/url-builder.service';

@Component({
    selector: 'online-board-flight-details-title',
    templateUrl: './flight-details-title.component.html',
})
export class OnlineBoardFlightDetailsTitleComponent extends DetailsTitleBase {
    constructor(
        protected translatePipe: TranslatePipe,
        protected urlService: OnlineBoardUrlBuilderService,
    ) {
        super(translatePipe, urlService);
    }

    protected get titleKey() {
        return 'SHARED.FLIGHT-INFO';
    }

    protected get pluralTitleKey() {
        return 'SHARED.FLIGHTS-INFO';
    }

    protected translateTitle(): string {
        return `${this.base}: ${this.flightInfo}, ${this.departure} - ${this.arrival}`;
    }

    protected translatePluralTitle() {
        return this.translateTitle();
    }
}
