import {Component, OnInit, EventEmitter} from '@angular/core';
import {DialogRef, ModalComponent, CloseGuard} from 'ngx-modialog';
import {BSModalContext} from 'ngx-modialog/plugins/bootstrap';
import UtilService from "@common/services/util/index";

declare var $: any;

export class <%= className %>Context extends BSModalContext {
    constructor(private args: any = {}) {
        super();
        /*
        * 点击背景是否隐藏模态框
        * @value true 不隐藏
        * @value false 隐藏
        * */
        this.isBlocking = false;
        /*
        * 模态框位置
        * @value modal-top 居顶
        * */
        this.dialogClass = 'modal-dialog modal-top <%= selector %>';
    }
}

@Component({
    selector: '<%= selector %>',
    templateUrl: './template.html',
    styleUrls: ['./style.less']
})
export default class <%= className %> implements OnInit, ModalComponent<<%= className %>Context> {
    list: any = [];
    otherData: any = {};
    context: any = {};
    totalPage: number = 20;
    pageNum: number = 1;

    constructor(public dialog: DialogRef<<%= className %>Context>, private utilService: UtilService) {
        this.context = dialog.context;
    }

    ngOnInit(): void {
        this.list=[1,2,3,4,5,6,7,8,9,0]
    }

    getData(pageNum){

    }
}