import Panel from "../../libs/new_wx/components/Panel";
import { DataManager } from "../../libs/tw/manager/DataManager";
import PanelCtrl from "../../libs/new_wx/ctrls/panelCtrl";

export default class Prize2Panel extends Panel {
    //能量礼物
    start() {
        super.start();
        const data = DataManager.ins.getData('getPlugOrderStatus1');
        this['nametxt'].text = data.lottery.title;
    }

    initEvents() {
        super.initEvents();
        this.useBtn.addEventListener(egret.TouchEvent.TOUCH_TAP, this.onTap_useBtn, this);
    }

    onTap_useBtn() {
        PanelCtrl.instance.show('rewardPanel');
    }

    get skinKey(): string { return 'Prize2' }
    useBtn: eui.Button;
}