import { Component, Input, Output, EventEmitter, ViewChild } from '@angular/core';
import { ModalDirective } from 'ngx-bootstrap/modal';

@Component({
  selector: 'modal-message',
  templateUrl: './modal.html',
  styleUrls: ['./modal.scss'],
})

export default class Modal {
  @Input() private title: string;
  @Input() private message: string;
  @Input() private cancelText: string;
  @Input() private denyText: string;
  @Input() private agreeText: string;
  @Output() private onHideCallback = new EventEmitter<any>();
  @Output() private denyAction = new EventEmitter<any>();
  @Output() private agreeAction = new EventEmitter<any>();
  @ViewChild('childModal') private childModal: ModalDirective;

  public onHideClb = () => {
    if (this.onHideCallback) 

  }

  private closeModal() {
    this.childModal.hide();
  }

  private agree() {
    this.agreeAction.emit();
  }
}

{
      this.onHideCallback.emit();
    }