import { Component, OnInit } from '@angular/core';
import {FramePageComponent} from "../../core/page/frame.page";
import {BsModalService} from "ngx-bootstrap/modal";
import {FrameThreadTestComponent} from "../frame-thread-test/frame-thread-test.component";
import {FrameThreadRunningComponent} from "../frame-thread-running/frame-thread-running.component";
import {FrameUpload} from "../../../../core/frame/upload/frame-upload/frame-upload";
import {MsgService} from "../../../../core/service/msg.service";

@Component({
  selector: 'app-frame-thread-page',
  templateUrl: './frame-thread-page.component.html',
  styleUrls: ['./frame-thread-page.component.scss']
})
export class FrameThreadPageComponent  extends FramePageComponent implements OnInit {

  FrameUpload = FrameUpload;
  constructor(modalService: BsModalService) {
    super(modalService);
    this.modalComponent = FrameThreadTestComponent;
  }

  ngOnInit() {
  }

  openThreadRunningWindow(thread) {
    this.showComponentModal(FrameThreadRunningComponent,{ResponseEntity:thread},{
      class: 'modal-5p'
    });
  }

  uploadCallback(ajax) {
    MsgService.successAlert('This is upload callback!');
  }

  uploadWithThreadCallback(ajax) {
    alert('This is upload callback with thread');
  }



}
