import { Component, OnInit, ViewChild } from '@angular/core';
import { BsModalRef } from 'ngx-bootstrap/modal';
import { FramePager } from 'src/app/core/frame/pager/frame-pager/frame-pager';
import { FrameDetailComponent } from 'src/app/routes/frame/core/detail/frame.detail';

@Component({
  selector: 'app-ticket-download-report-detail',
  templateUrl: './ticket-download-report-detail.component.html',
  styleUrls: ['./ticket-download-report-detail.component.scss']
})
export class TicketDownloadReportDetailComponent extends FrameDetailComponent implements OnInit {

  @ViewChild('pager', { static: false }) pager: FramePager;

  constructor(bsModalRef: BsModalRef) {
    super(bsModalRef);
  }

  ngOnInit(): void {
    debugger
    console.log(this.ResponseEntity);
  }

  exportStd() {
    var report_name = '';
    if (this.ResponseEntity.downloadFlag) {
      report_name = 'TicketStdDownloadReport';
    } else {
      report_name = 'TicketStdNotDownloadReport';
    }
    let entity = {
      province_flag: this.ResponseEntity.provinceFlag,
      report_name: report_name
    };
    this.FuncService.ajaxDownload('frame/report/download.htm', entity);
  }

}
