import { ChangeDetectorRef, Component, NgZone, OnInit } from '@angular/core';
import { AvalonService } from '../../../services/avalon.service';
import { AvalonBase } from '../avalonBase';

@Component({
  selector: 'avalon-quest-vote',
  templateUrl: './quest-vote.component.html',
  styleUrls: ['./quest-vote.component.scss']
})
export class QuestVoteComponent extends AvalonBase implements OnInit {

  constructor(
    protected cdRef: ChangeDetectorRef,
    protected avalonService: AvalonService,
    private ngZone: NgZone
  ) {
    super(cdRef, avalonService);
  }

  ngOnInit(): void {
  }


  public voteQuestVote(value: boolean) {
    this.me.questVote = value;
    this.broadcastMe('VoteQuest');
    this.avalonService.applyCdChange$.next();
  }
}
