import {
    ChangeDetectionStrategy,
    Component,
    Input,
    ViewEncapsulation,
} from '@angular/core';

export type IFlightEventsDirection =
    | 'row'
    | 'row-mobile'
    | 'column'
    | 'column-mobile';
@Component({
    selector: 'flight-events',
    templateUrl: './flight-events.component.html',
    styleUrls: ['./flight-events.component.scss'],
    encapsulation: ViewEncapsulation.None,
    changeDetection: ChangeDetectionStrategy.OnPush,
})
export class FlightEventsComponent {
    @Input() reroute = false;
    @Input() changeRoute = false;
    @Input() showDescription = false;
    @Input() direction: IFlightEventsDirection = 'row';

    get flightEventsClasses() {
        return {
            'flight-events': true,
            [`flight-events--${this.direction}`]: this.direction !== 'row',
        };
    }
}
