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

@Component({
    selector: 'board-flight-bottom',
    templateUrl: './board-flight-bottom.component.html',
    styleUrls: ['./board-flight-bottom.component.scss'],
})
export class BoardFlightBottomComponent {
    @Input() flight: FlightModel;

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

    ViewType = ViewType;

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