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> {
    data: any = {};
    otherData: any = {};
    context: any = {};

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

    ngOnInit(): void {
    }
}