import { Component, EventEmitter, Input, Output } from '@angular/core';
import { IFlight } from '@typings/flight/flight';

@Component({
    selector: 'flight-details-button',
    templateUrl: './flight-details-button.component.html',
    styleUrls: ['./flight-details-button.component.scss'],
})
export class FlightDetailsButtonComponent {
    @Input() flight: IFlight;

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

    openDetails() {
        this.toDetails.emit(this.flight);
    }
}
