import { Component, OnInit, Input, ViewChild, TemplateRef } from '@angular/core';
import { DialogComponent, DialogService } from 'ng2-bootstrap-modal';
export class ConfirmModel {
  title: string;
  message: string;
  hclass: string = 'modeldefault';
  oktext: string;
  canceltext: string;
  okshow: boolean;
  cancelshow: boolean;
}
declare var $: any;
@Component({
  selector: 'app-commondialog',
  templateUrl: './commondialog.component.html',
  styleUrls: ['./commondialog.component.css']
})

export class CommondialogComponent extends DialogComponent<ConfirmModel, boolean> implements OnInit {
  title: string;
  message: string;
  hclass: string = 'modeldefault';
  oktext: string;
  canceltext: string;
  okshow: boolean;
  cancelshow: boolean;

  constructor(public dialogService: DialogService) {
    super(dialogService);
  }
  confirm() {
    // ;

    this.result = true;
    this.close();
  }

  ngOnInit() {
    // ;
    $('#btnOK').focus();
    $('#bodyid').append('<div id="optboot" class="modal-backdrop fade in" style="opacity:0.5"></div>');
  }
}
