import Panel from "../../libs/new_wx/components/Panel";
import { HtmlTextParser } from "../../libs/new_wx/HtmlTextParser";
import SceneCtrl from "../../libs/new_wx/ctrls/sceneCtrl";
import { NetManager } from "../../libs/tw/manager/NetManager";


export default class AdminPanel2 extends Panel {
    public labContent: eui.Label;
    public scroller: eui.Scroller;
    id;
    start(data) {
        super.start();
        this.id = data.id;
        this['okbtn'].addEventListener(egret.TouchEvent.TOUCH_TAP, this.ontap_btn1, this);
    }

    ontap_btn1() {
        this.touchEnabled = false;
        this.touchChildren = false;
        NetManager.ins.yyh_assist1_reviewDream((s) => {
            this.touchEnabled = true;
            this.touchChildren = true;
            // if(s){
                this.hidePanel();
                SceneCtrl.instance.change('AdminScene');
            // }
            
        }, this.id, false);
    }

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

    get skinKey() { return 'AdminPanel2' }
    get skinResKey() { return 'admin' }

}