import { Component, EventEmitter, Input, Output } from '@angular/core';

export type FavoriteButtonType = 'counter' | 'action';

@Component({
  selector: 'app-favorite-button',
  templateUrl: './favorite-button.component.html',
  styleUrls: ['./favorite-button.component.scss'],
})
export class FavoriteButtonComponent {
  @Input() type: FavoriteButtonType = 'action';
  @Input() isLiked = false;
  @Input() likesCount = 0;

  @Output() onClick = new EventEmitter<void>();

  handleOnClick() {
    this.onClick.emit();
  }
}
