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

@Component({
    selector: 'schedule-search-result-flight-body',
    templateUrl: './schedule-search-result-flight-body.component.html',
})
export class ScheduleSearchResultFlightBodyComponent {
    @Input() flight: DirectFlight;
    @Output() toDetails = new EventEmitter<IFlight>();

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