import { Component, EventEmitter, Input, Output } from '@angular/core';
import { ScheduleSortMode } from '@app/shared/models-legacy';

@Component({
    selector: 'schedule-search-result-header',
    templateUrl: './schedule-search-result-header.component.html',
})
export class ScheduleSearchResultHeaderComponent {
    ScheduleSortMode = ScheduleSortMode;
    public footnotes = '*';

    @Input() sortBy: ScheduleSortMode = ScheduleSortMode.arrivalDown;
    @Output() sortByChange = new EventEmitter<ScheduleSortMode>();

    onSort(mode: ScheduleSortMode) {
        this.sortByChange.emit(mode);
    }
}
