import { Component, EventEmitter, Input, Output } from '@angular/core';
import { IPopularRequest } from '@typings/popular-request';
import { RequestMode } from '@typings/enums';

@Component({
    selector: 'popular-request',
    templateUrl: './popular-request.component.html',
    styleUrls: ['./popular-request.component.scss'],
})
export class PopularRequestComponent {
    RequestMode = RequestMode;
    @Input() request!: IPopularRequest;
    @Output() onClick = new EventEmitter<IPopularRequest>();

    onRequestClick(request: IPopularRequest) {
        this.onClick.emit(request);
    }
}
