import { Component, OnInit } from '@angular/core';
import { Router } from "@angular/router";

@Component({
  selector: 'app-score-popup',
  templateUrl: './score-popup.component.html',
  styleUrls: ['./score-popup.component.scss']
})
export class ScorePopupComponent implements OnInit {
  is_modal_visible: boolean = false;
  screen_callback: any;
  assessment_id: number;
  content_data: any;
  constructor(private router: Router) { }

  ngOnInit() {
  }


  public showcontentrModal(url: string = "", data: any = {}, callBack: any = null) {
    this.is_modal_visible = true;
    this.content_data = data;
    this.screen_callback = callBack;;

  }


  onCloseModal(type) {
    this.is_modal_visible = false;
    this.screen_callback(true);

  }

  onContine() {
    this.router.navigateByUrl('myassessment');
  }

  onReview() {
    this.is_modal_visible = false;
    this.screen_callback('review');
  }

}
