import { Component, EventEmitter, Input, Output } from '@angular/core';
import { FlightModel } from '@shared/models-legacy';
import { ViewType } from '@app/shared/enumerators/flight-request-type.enum';
import { IFlight } from '@typings/flight/flight';

@Component({
    selector: 'flight-details-body-actions',
    templateUrl: './flight-details-body-actions.component.html',
    styleUrls: ['./flight-details-body-actions.component.scss'],
})
export class ScheduleSearchResultFlightDetailsBodyActionsComponent {
    @Input() flight: FlightModel;
    ViewType = ViewType;

    @Output() toDetails = new EventEmitter<IFlight>();

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