import {Component, Input, Output, EventEmitter} from '@angular/core';
@Component({
selector: 'search-sorting',
template: `
`
})
export class SearchSortingComponent {
@Input() isDisabled: boolean = false;
@Input() sortBy: string = '';
@Input() entityType: string = '';
@Output() sortByChange = new EventEmitter();
public optionsA = [
{value: '', label: 'Relevance'},
{value: 'resultdateofacceptance,descending', label: 'Date (most recent)'},
{value: 'resultdateofacceptance,ascending', label: 'Date (least recent)'},
];
public optionsB = [
{value: '', label: 'Title'},
{value: 'creationdate,descending', label: 'Creation Date (most recent)'},
{value: 'creationdate,ascending', label: 'Creation Date (least recent)'},
];
constructor () {}
ngOnInit() {}
sortByChanged() {
this.sortByChange.emit(this.sortBy);
}
}