import Panel from "./Panel";
import SceneCtrl from "../ctrls/sceneCtrl";
import { ModuleTypes } from "../types/sceneTypes";
export default class Alert extends Panel {
    start(data) {
        super.start(data);
        const { message, btnTxt } = data;
        this.data.message = message;
        this.data.btnTxt = btnTxt || '确定';
    }

    get skinKey() { return 'Alert' }

    get skinResKey() { return 'common' }

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

    hidePanel() {
        super.hidePanel();
        SceneCtrl.instance.change(ModuleTypes.START_SCENE);
    }
}