import { Component, Input } from '@angular/core';
import { FlightModel } from '@app/shared/models-legacy';
import { RegistrationLogic } from './registration.logic';
@Component({
    selector: 'registration-button',
    templateUrl: './registration-button.component.html',
    styleUrls: ['./registration-button.component.scss'],
})
export class RegistrationButtonComponent {
    @Input() flight: FlightModel;
    constructor(private registration: RegistrationLogic) {}

    open() {
        if (!this.flight) return;
        this.registration.goto(this.flight);
    }
}
