import { Component, OnInit } from '@angular/core';
import { HyperService } from '../../core/services/http.service';

@Component({
  selector: 'app-confirmpop',
  templateUrl: './confirmpop.component.html',
  styleUrls: ['./confirmpop.component.scss']
})
export class ConfirmpopComponent implements OnInit {
  screen_callback:any;
  cancel_callback:any;
  pop_text="";
  is_modal_visible: boolean = false;
  constructor(private server: HyperService) { }

  ngOnInit() {
  }
  public confirmPopups(url: string = "", scallBack: any = null, ecallBack: any = null ){
    this.screen_callback = scallBack;
    this.cancel_callback = ecallBack;
    this.pop_text = url;
    this.is_modal_visible = true;
  }
  onCloseModal(){
    this.is_modal_visible = false;
    this.cancel_callback(true);
  }
  onSubmit(){
    this.is_modal_visible = false;
    this.screen_callback(true);
  }
}
