import { Component, OnInit, Output, EventEmitter } from '@angular/core';
import { ModalService } from '@libs/ui';

@Component({
  selector: 'app-remission-start-dialog',
  templateUrl: './remission-start-dialog.component.html',
  styleUrls: ['./remission-start-dialog.component.scss'],
})
export class RemissionStartDialogComponent implements OnInit {
  id = 'remission-start-modal';
  @Output() start = new EventEmitter();
  constructor(private modalService: ModalService) {}

  ngOnInit() {}

  public openDialog() {
    this.modalService.open(this.id);
  }

  closeDialog() {
    this.modalService.close(this.id);
  }

  startRemission() {
    this.closeDialog();
    this.start.emit();
  }
}
