import { Component, ChangeDetectionStrategy, EventEmitter, Output, Input } from '@angular/core';
import { VIEW_SWITCH } from '../../constants';

@Component({
  selector: 'app-task-calendar-double-choice-switch',
  templateUrl: 'task-calendar-double-choice-switch.component.html',
  styleUrls: ['./task-calendar-double-choice-switch.component.scss'],
  changeDetection: ChangeDetectionStrategy.OnPush,
})
export class TaskCalendarDoubleChoiceSwitchComponent {
  viewSwitch = VIEW_SWITCH;

  @Input() isFirstSwitched = true;
  @Output() changeView = new EventEmitter<void>();

  constructor() {}

  onChangeView() {
    this.isFirstSwitched = !this.isFirstSwitched;
    this.changeView.emit();
  }
}
