import { Component, EventEmitter, Input, Output } from '@angular/core';
import { MultiLegFlight } from '@app/shared/models-legacy';
import { ISimpleFlight } from '@typings/flight/flight';

@Component({
    selector: 'board-multi-flight-body',
    templateUrl: './board-multi-flight-body.component.html',
    styleUrls: ['./board-multi-flight-body.component.scss'],
})
export class BoardMultiFlightBodyComponent {
    @Input() flight: MultiLegFlight;
    @Output() toDetails = new EventEmitter<ISimpleFlight>();

    handleToDetailsEvent(flight: ISimpleFlight) {
        this.toDetails.emit(flight);
    }
}
