import Panel from "./Panel";
export default class Alert extends Panel {
    start(data) {

        const list = [
            '没有抽奖机会了，\n明天再来吧~',
            '网络有问题，\n请退出后重试~',
            '网络有问题，\n请退出后重试~',
            '还未登录，\n请登录后参加~',
            CFG.unitName + '不足，\n多赚点' + CFG.unitName + '再来吧~'
        ]
        const { btnTxt, type, message } = data;
        const alertmessage = list[type - 1];
        this.data.message = message || alertmessage || '系统异常，\n请刷新后重试。';
        // this.data.btnTxt = btnTxt || '确定';

        // if (this[`img_title${type}`])
        //     this[`img_title${type}`].visible = true;
    }

    get skinResKey() { return 'common' }
    get skinKey() { return 'Alert' }

    protected get closeBtns(): eui.Button[] {
        return [this['closeBtn']]
    }
}