import { Component, Input, OnChanges, SimpleChanges } from '@angular/core';
import { ITransition, ITransitionItem } from '@app/shared/models-legacy';

@Component({
    selector: 'flight-details-registration',
    templateUrl: './flight-details-registration.component.html',
    styleUrls: ['./flight-details-registration.component.scss'],
})
export class FlightDetailsRegistrationComponent implements OnChanges {
    @Input() transition: ITransition;
    @Input() hasTimeNote: boolean;

    registration?: ITransitionItem;

    ngOnChanges(changes: SimpleChanges) {
        if ('transition' in changes) {
            this.registration = this.transition?.registration;
        }
    }
}
